Monday, March 26, 2012

Parameter Default

Hi

I have a report parameter that may contain one item or it may contain more than one item. Is there a way I can default the parameter if it contains one item, to that item. But have no default if there is more than one option?

Cheers

*Bump* Anyone?

To clarify - I have a report parameter combo box, it contains:

Option 1 Option 2 Option 3|||

Hi Yellow,

BEGIN
DECLARE @.V_COUNTER INT

SELECT @.V_COUNTER=COUNT(*) FROM DIM_table WHERE user_ID=@.user_ID

IF @.V_COUNTER=0

SELECT "option 1 " AS FISCAL_YEAR_ID,'' as SRCCD
ELSE

SELECT options FROM DIM_table WHERE user_ID=@.user_ID

END

If i understood your problem, i can recommend this type of query in your dataset and make use of default in "Report parameters"

Thank you,

Raj Deep.A

|||

Thanks Raj Deep. I think that would work for me. Is there a way in the parameter default itself to do something like:

If Count(Parameter) = 1 Then

Default = Parameter 1

Else

No Default

Endif

Thanks

sql

No comments:

Post a Comment