View multiple drillthrough reports in one ReportViewer



I want to use only one WebForms page, with one ReportViewer to display all
the reports for my project. Some of the reports are tables, and some of the
reports are charts.

Here is what I want to be able to do:

1) I want to display all reports on one page, using the same ReportViewer,
changing reports based on user input, OR based on a user click directly on
the report (drillthrough).

2) I want to switch freely between table and chart reports.

Here is what I have accomplished so far:

1) When the page loads, either I select to display either a Chart or a Table
report. That report displays fine.

2) The page allows me to drillthrough on the drillthrough reports.

3) The page and ReportViewer also allow me to freely switch between reports
with different parameters simply by changing the ReportPath and updating that
report's datasource.

Here is what I cannot do and what I need help doing:

1) When I select a certain type of report (either Table or Chart), the only
reports that can be displayed on the ReportViewer from then on can only be of
the same type (if I first select Table, then I can only drillthrough/jump-to
and display Table reports). For some reason, when I try to change the
ReportViewer.LocalReport.ReportPath, the report that is displayed does not
change. In the Immediate window, however, it does say that
ReportViewer.LocalReport.ReportPath is set to the correct path. Keep in
mind, that when I display these other reports, I still need to have them

I referred to this posting:

but I found that they did not address the topic of wiring up the
drillthrough event.

I tried the method suggested in the post (to create a brand new ReportViewer
and add it to the control collection at the same location as the old
ReportViewer, then deleting the old control from the collection), but then
the drillthrough event is no longer wired up.

Any suggestions?


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question