September 29, 2013

SSRS– Multi value parameter–Choosing predefined List

 

I read the below wiki article from satynarayan and found it very interesting as this help in some peculiar scenarios. In SSRS, multi select can be easily allowed but sometime we want to force the combination rather then allowing all possible values  .  This might be due to wrong aggregated values or meaningless figures.

let us say we have parameter with A,B,C and D values. Now we want to force the user to choose only A,B,C or A,C,D or A or B or C.

Instead of Allowing all possible 16 combination, we want to allow only 5 predefined combination. This is very hard to achieve and often need custom code to validate the combinations. But  Satyanarayan proposed a simple solution.

Please read the below article.

In nutshell define the combination as individual parameter values like “A,B,C” and then parse it in the SQL using XML functions.

http://social.technet.microsoft.com/wiki/contents/articles/19621.ssrs-multi-valued-parameter-as-stored-procedure-input.aspx

Happy Reading Smile

No comments:

Post a Comment