Can you use a mutlivalue parameter to filter a group
I want to filter a group based on a multivalue parameter. However, selecting the IN operator disables the expression editor. Can anyone show some code on how to parse the multivalue parameter so that the filter works?
July 10th, 2011 4:34am
It seems that this is a
SSRS aspect question, so I moved this thread here for more expert help.
Best wishes,Mike [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
July 13th, 2011 3:05pm
Hi Toppin,
Based on your requirement, there are two methods to solve this issue: Add a filter and SQL expression.
Method 1: Add a filter on a dataset.
1. Create a multiple-parameter. The parameter is named Category which is includes Accessory, Bike, Clothing, Component.
2. Right-click on the main dataset and select “Dataset Properties”.
3. Click “Filters” page, and click “Add”. Then set the filter like this:
Expression: [Category]
Operator: IN
Value: [@Category]
4. Click OK to close the dialog.
Method 2: Using dynamic query in the main dataset to achieve this.
1. Create a multiple-parameter. The multi-parameter is named Category.
2. Right-click on the main dataset and select “Dataset Properties”.
3. In the “Query:” section, click “fx” button.
4. Set the expression like this:
="SELECT Category, SubCategory, Year FROM MyTable WHERE Category IN (‘” + Join(Parameters!Category.Value, “’,'") + "')"
5. Click OK to close the dialog.
If you have any more questions, please feel free to ask.
Thanks,
Bin Long
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com
July 14th, 2011 9:55pm