March 9, 2015 at 1:09 pm
I'm using Report Builder 3.0 (SQL Server 2008 R2). One of the parameters is Group. The user selects a group and the report runs like it is supposed to. So far so good.
I've added a second parameter for Region. When the user selects the Group, the Region parameter populates with the regions for that selected Group. No problem so far.
When the user selects the Region parameter, a Branch parameter is populated with all of the branches in the selected region.
What I'm trying to do, is to filter the report with the list of branches in the Branch parameter. I also have a dataset with the appropriate branches.
I cannot get the report to run with a filter. Without the filter the report runs just fine. with the filter, no data in the report.
The table that the branch is run from (for the report) shows the branch field as CHAR (10). The Branch parameter is populated from a different table and that branch field is shown as VAR (CHAR (20)).
Is the difference in these 2 fields causing the report to not display any data with a filter? Thanks for the help.....
March 10, 2015 at 2:52 am
What does your query/filter look like?
IF you can modify the stored procedure, you can use something like this:
SELECT city, companyname, custid
FROM Sales.Customers
WHERE (city IN (@City))
then if you set the parameter to allow multiple values, IN (@paramName) will handle it. If you try to use =, it will fail.
So yours would be something like
SELECT Branch, Region
FROM Banks
WHERE (Branch IN (@BranchList))
where @BranchList is your multi-select parameter listing Branches. Kind of a simplification, but hopefully you get the idea.
March 10, 2015 at 7:44 am
Thanks for the suggestion. I ended up changing the sql to only pull in the branches I'm using for the main dataset and didn't use the filter. I'm going to make a copy and try to get the filter to work with your suggestion because I think filters could be very useful in the reports we are writing. Thanks for the feedback
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply