What is the recommended way to pass parameters into a report generated via the web? Example - if I have want to generate a report for a specific order where the orderid is passed to the page via the querystring what is the best way to pass that parameter to the reports data source?
Don't know if it is the recommended way, but I get the data and then assign the data view to the data source. I don't have the reports access the data directly. Mainly because I use a DAL framework to retrieve data. This makes passing parameters real easy.
0
Svetoslav
Telerik team
answered on 04 Jul 2007, 04:40 PM
Hi guys,
DAL frameworks usually wrap all code needed to connect to a database and manipulate its data. Under the hood they all depend on ADO.NET and its functionality.
ADO.NET uses Command objects to encapsulate the queries against a database Connection. Commands can use Parameters to access the input and output parameters and return value of a query. Here is an article how to use ADO.NET commands: http://msdn2.microsoft.com/en-us/library/tyy0sz6b.aspx.
If you don't use any 3rd party data access frameworks, and want to stick with .NET, the best way to pass parameters is to use a Command with Parameters to fill a data set and then pass this data set as a report data source.