Expression to display ALL in Header if all parameters are selected
Hi i need to write a Expression to display ALL if select all the values in my PArameter. FOr example: parameter is CODE and its an multi value parameter and has the values -1,2,33,40....... if select only -1 the i can display -1 in header if i select ALL then i need to get "ALL - CODE"
January 31st, 2011 8:07pm

Hi, On completion of building query to load values in the parameter, UNION ALL that final result set with "ALL - CODE" the hard coded value. Further, while executing stored procedure to generate report, specific part of the query which deals with above parameter needs to be logically handled with appropriate logic where in If the value of parameter is "ALL - CODE", then there wont be any filter applied in the query while deriving the result set else apply the specific values that are passed by the parameter. HTH REgards, Phani Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem.
Free Windows Admin Tool Kit Click here and download it now
January 31st, 2011 11:51pm

Hi, On completion of building query to load values in the parameter, UNION ALL that final result set with "ALL - CODE" the hard coded value. Further, while executing stored procedure to generate report, specific part of the query which deals with above parameter needs to be logically handled with appropriate logic where in If the value of parameter is "ALL - CODE", then there wont be any filter applied in the query while deriving the result set else apply the specific values that are passed by the parameter. HTH REgards, Phani Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem.
January 31st, 2011 11:51pm

Hi Amar, If you know the count of parameter values then you can achieve the requirement. Here is a sample expression, =IIF(Parameters!CODE.Count=3,"ALL - CODE",JOIN(Parameters!CODE.Label,",")) Replace "3" with your parameter value counts. If you select -1 & 2 & 33 from your list this expression gives the result as -1,2,33. If you select 'Select All' option then it gives ALL - CODE Regards,
Free Windows Admin Tool Kit Click here and download it now
February 1st, 2011 12:30am

Hi Amar, If you know the count of parameter values then you can achieve the requirement. Here is a sample expression, =IIF(Parameters!CODE.Count=3,"ALL - CODE",JOIN(Parameters!CODE.Label,",")) Replace "3" with your parameter value counts. If you select -1 & 2 & 33 from your list this expression gives the result as -1,2,33. If you select 'Select All' option then it gives ALL - CODE Regards,
February 1st, 2011 12:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics