I've seen some threads here about Dynamic Data Sources.
I am using the ReportViewer Control for WebForms.
I simply want to say the following:
reportviewer fv = new Microsoft.Reporting.WebForms.ReportViewer();
rv.ServerReport.SetConnectionString(......);
I want to avoid using parameters to do this if I can. I've read that stored procedures don't work when you use parameters.
Is this possible?
Thanks
It sounds like you are using the ReportViewer control in LocalMode. In that case, your application has to directly provide the data as a dataset to the ReportViewer control. There is no connection string, because the ReportViewer control will never execute any queries in LocalMode. More information is available here: http://www.gotreportviewer.com/definedata/index.html and here: http://www.gotreportviewer.com/objectdatasources/index.html
If you use the ReportViewer control in ServerMode, it will just point to a report on a report server. That report is executed on the report server and could use an expression-based connection string, as discussed here: http://msdn2.microsoft.com/en-us/library/ms156450.aspx (scroll to the "Data Source expressions" section).
-- Robert
No comments:
Post a Comment