I have a web page (page1) that calls another page including the ReportViewer control. Page1 includes a button that when clicked redirects to the ReportViewer page. The call redirection from Page1 to the ReportViewer page includes 2 parameters in the QueryString. One parameter tells the ReportViewer which report to display from my report lib class. The other parameter is an ID I want to use in the report codebehind when building the datasource (e.g. Where customerID = paramID). I don't want to use the ID value as a filter.
The parameter, paramID, is already defined in the report designer with no Value.
In the ReportViewer, how do I set the report parameter, paramID, to the querystring value so that it will be used in the SQL query for the report's datasource?
In the ReportViewer page codebehind I'm trying the following but it doesnt' work:
Case "rptMyReport" 'this is the report name from the querystring
Dim appId As String = Request.QueryString("appId") 'this is passed from the first web page (Page1)
(ReportViewer1.Report, wwnReports.rptMyReport).ReportParameters("paramAppId").Value = appId
Me.ReportViewer1.Report = New wwnReports.rptMyReport