I'm a bit rusty on reporting and this is the first time I've tried this in VS2012.
I have a 4.0 C# web app I'm writing and I'm trying to add a page with a report viewer control. For now I'm trying to rough out an infrastructure that will allow me to run multiple different reports in this one control.
So far I have 3 reports running off an ObjectDataSource and an XSD. One of the table adapters has parameters in its Select statement. At the moment I have it hard-coded so that in the ObjectDataSource's Selecting event the parameters are added. (e.InputParameters.Add("Yr",
2012); etc...)
What I would like to know if if there's a way, in code, to examine the DataSet TableAdapters and get a list of the parameters required. Is this possible?
(I should explain further. I believe that in this project I may be able to limit the number of parameters to a relatively small standard set with standard names. What I am not certain of at this time is which parameters will be needed with each report.
It would be easier if I could simply detect their presence in the table adapter select statements.)
bchernick
Member
110 Points
267 Posts
Is there any way to detect required parameters in TableAdapter select statements?
Jan 30, 2013 09:21 PM|LINK
I'm a bit rusty on reporting and this is the first time I've tried this in VS2012.
I have a 4.0 C# web app I'm writing and I'm trying to add a page with a report viewer control. For now I'm trying to rough out an infrastructure that will allow me to run multiple different reports in this one control.
So far I have 3 reports running off an ObjectDataSource and an XSD. One of the table adapters has parameters in its Select statement. At the moment I have it hard-coded so that in the ObjectDataSource's Selecting event the parameters are added. (e.InputParameters.Add("Yr", 2012); etc...)
What I would like to know if if there's a way, in code, to examine the DataSet TableAdapters and get a list of the parameters required. Is this possible?
(I should explain further. I believe that in this project I may be able to limit the number of parameters to a relatively small standard set with standard names. What I am not certain of at this time is which parameters will be needed with each report. It would be easier if I could simply detect their presence in the table adapter select statements.)