I am looking for the ability to simply drop new reports into a folder (and maybe a database entry) which is then enumerated to add new report options for my clients. I thought the reports could be self contained in that all it needs is a data source specified and parameter selection and formatting is handled by the report itself. However, the samples I see that include date pickers seem to have a custom report viewer that implements the date pickers and maps them to the report parameters. Is this the only way to accomplish this more advanced parameter selection? Does that mean that any report that requires parameters of a little more than very basic text entry will require a custom report viewer specific to accommodate that report? Am I using the wrong approach to accomplish this goal?
If there is no way to use a datepicker inside the report designer is there a way the ReportViewer can interrogate a report to see what parameters are needed and what type they are? This would allow me to create a ReportViewer page that can display a user selection page to enter in all the parameters dynamically depending on the report that has been chosen.
Hi Mike,
Currently there is no DatePicker control that can be used within the Report. The only controls available are the ones listed here: http://help.infragistics.com/NetAdvantage/reporting/2012.1/CLR4.0?page=Reporting_Environment_Controls.html
I've gone and logged this as a new product idea however and sent it directly to our product management team. Our product team chooses new product ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. Your reference number for this product idea is PI12070164.
As for interrogating a report, there isn't a way to do this through the report viewer before the report starts loading. Before the loading happens the report viewer reads the report file and then pops open a UI asking the user to supply parameter values if the report requires them. There is no event that I can see that occurs before this that would let you know there are parameters in the report. Once the parameters are supplied it then starts loading the report. This sounds like what you are looking for correct?
If this isn't what you are looking for then you are probably going to need to read in the report file yourself and parse the file to see if parameters exist. If they do, you can display your own page asking the user for the parameter values and then supply those values to the XamReportViewer. Once those parameters have been supplied you can take the System.IO.Stream where the report your reading is being held and feed that to the XamReportViewer instead of using a DefinitionUri. The property would be DefinitionStream instead. This shouldn't be to difficult as the report file (*.igr) is just a text file with XAML code. The required parameters for the report are located between the <Report.Parameters> tag and an example of what it would like is as follows:
<Report.Parameters>
<Parameter Name="parameter1" DisplayName="Parameter One" DataTypeString="System.String" />
<Parameter Name="parameter2" DisplayName="Parameter Two" DataTypeString="System.String" />
</Report.Parameters>
Let me know if you have any questions on this.
Let me know if you have any further questions on this matter.