Friday 20 February 2015

Multivalued Parameters


1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16

      Single Valued Parameters accepts only one value(example Dept_ID: 10), if you pass more-than one values (example Dept_ID: 10,20) report will through error. If we write an expression then it will accepts multiple values (Multivalued Parameter).
 
  • Create Single Valued Parameters report with Dept_ID parameter.
  • If we pass multiple departments (10,20) then report will fail.
  • Normally parameter wont accept multiple values. If we want to pass multiple values we need to write expression.
  • Go to "Design" and Right click on "Dataset" and select "Properties". Then "Dataset Properties" window will open.
  • Go to "Parameters" section. Click on parameter "Expressions" then "Expression" window will open.
  • Write expression 
    •  =IIF(Parameters!Dept_ID.Value="",-1,Split(Parameters!Dept_ID.Value,","))
  • Click on "OK" button.
  • Go to "Preview" and pass Dept_ID filter values (10,20,30). Click on "View Report" button then report will generate.

No comments:

Post a Comment