This is a migrated thread and some comments may be shown as answers.

Best way to pass parameters in?

2 Answers 391 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
AbsolutelyN
Top achievements
Rank 1
AbsolutelyN asked on 03 Jul 2007, 06:32 PM
Hi.

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?

Thanks
Tristan

2 Answers, 1 is accepted

Sort by
0
dtrumbower
Top achievements
Rank 1
answered on 03 Jul 2007, 06:43 PM
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.
 

Regards,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
AbsolutelyN
Top achievements
Rank 1
Answers by
dtrumbower
Top achievements
Rank 1
Svetoslav
Telerik team
Share this question
or