I am using ReportViewer
control in my asp.net web application.
There is a button called View Report, the following code is in the asp.net button Click
event which loads the report. The parameters are selected on the web page
and passed on to ReportViewer
control as shown below. This works fine.
rptvw.ProcessingMode = ProcessingMode.Remote;
rptvw.ServerReport.ReportServerUrl = new Uri("http://localhost:90/reportserver");
rptvw.ServerReport.ReportPath = "/Reports/Dashboard1";
var param = new ReportParameter[2];
param[0] = new ReportParameter("Parameter1", dropdownlist1.SelectedItem.Text))
param[1] = new ReportParameter("Parameter2", dropdownlist2.SelectedItem.Text));
rptvw.ServerReport.SetParameters(param);
rptvw.ServerReport.Refresh();
I have 3 separate reports (.rdl files) for example Dashboard2
, Dasboard3
and Dashboard4
.
On Dashboard1
(.rdl file) report there are actions
, links, when clicked it loads Dashboard2
, Dashboard3
and 4 reports.
My problem is how can the web page know which report is loaded so that I can apply the relevant parameters when View Report button is clicked and display the respective report?
Which ReportViewer
web control eventcan I use to determine which report is loaded?