December 8, 2009 at 12:58 pm
I'm using Visual Studio 2005 to develop a Web site in local mode that includes a ReportViewer control to display a report with a multi-value parameter. I haven't been able to figure out how to code my report stored procedure correctly for a multi-value parameter. Here's a simplified version of the report stored procedure output:
Department|ExpenseTotal|RevenueTotal|Type
Ticket Sales|1000 |2000 |Budget
Ticket Sales|1500 |1750 |Actual
The report stored procedure is using this select statement to produce the output:
SELECT * from ReportTable where Type in (@Type)
In the report, I want the user to be able to choose which Type values they want to view; either Budget only, Actual only, or Budget & Actual. I've tried creating a CheckBoxList with one checkbox for Budget and one checkbox for Actual. The report works when one of those options is checked, but displays nothing if both Budget and Actual are checked.
Is this because of the way the WHERE clause of my report stored procedure is coded? Does anyone have a suggestion for how I can get both Budget and Actual values to display when both checkboxes are checked?
December 23, 2009 at 7:49 am
Hi,
You should be able to create the multi-value parameter in the development studio.
Click on the report menu and then report parameters, you will then need check the multi-value tick box, then under the available values check the non-queried radio button and enter the values you want in the pick list.
Note you will not need to create a pick list value for 'Budget and Actual' because when you run the report in the paramter pick list there will be a 'select all ' option which will allow you to include all the values in your pick list.
Your where clause is correct as you have brackets around the parameter.
Let me know you get on.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply