So...
- create two or more reports (we need more than one to demonstrate that the selection is working) and deploy them to your server.
- create a stored procedure to return a list of the reports on your server
- create an ASP.Net web page
- drag onto the page
- one data source (dsReportList)
- one drop down list (ddlreportlst)
- one reportviewer object (reportviewer1)
- set the data source to reference the stored procedure
- set the drop down list to reference the data source
- set the report viewer to be
- a server report
- reference the report server url - the locations where the reports were deployed
- if you want the report to have data in it then also set it to a specific report
- edit the code behind for the SelectedIndexChanged section of the drop down list code to be:
With ReportViewer1
.ServerReport.ReportPath = "/vms/" & ddlReportList.SelectedItem.ToString
.ServerReport.Refresh()
End With
Make sure the AutoPostBack value for the Drop Down List is True so each time it is changed the page refreshes.
Should work now.
No comments:
Post a Comment