
Signature
Bruce Loehle-Conger
MVP SQL Server Reporting Services
Bruce,
What you say is quite interesting to me. Would you give me a little more
deail in some areas...
> If you are talking about a RDLC file that means you are using the
> ReportViewer control in local mode.
Yes
> You have complete control over the data being retrieved.
> You just need to have a variable somewhere set on whether to use the
> existing dataset or generate a new one.
In all cases for this report I want to use the same query.
> In local mode you hand the control the dataset (really the tableset) and
> the report.
Restate the above for me to clarify.
> For drill through you are writing code that responds to the event.
I see the 'back' and the 'drillthrough' events. How do I use these to add a
filter to the main query?
> In general I feel that local mode is inferior to server mode. However,
> this is one scenario that because you have total control, you are able to
> do exactly as you want in this case (re-use the dataset).
Could you explain how I would do this?
Do I fill a table adapter with the resuts of the stored procedure and then
query that dataset for each report?
If so, How do I filter the dataset and had the results to the report viewer?
Could you give me sampe (or pseudo) code for this?
> This would not be possible via the server without lots of hoops (for
> instance, you could create a table that is based on the user, the first
> report calls the stored procedure which fills in the data along with the
> username, you can pass the username using the globals variable UserID.
> Then the other reports query this table instead of calling the sp.
How do I do this.
More importantly: How do I supply the dataset to the ReportViewer.
Currently I am configuring a SqlDataSource with the results of a sp and then
wiring up the ReportViewer to use it. I can find no way to wire the Report
viewer to soe kind of coded dataset. Is it possible.
Please get me started on this. Thank you very much,
Doug