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

How to create Report using parameters from Codebehind/DesignTime to pass datasource parameters?

1 Answer 219 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Surendra
Top achievements
Rank 1
Surendra asked on 22 Jan 2014, 07:30 AM
Hi team,
I am new for this telerik reporting, I want to create using parameter pass to data-source using stored procedure parameter then i want display data in Report.
Ex: my SP like this

select * from table where Id=iId;   So I need to pass value for this iId value through code behind and get that datasource to report.

For this how we pass value report parameter, i am getting report parameter  value like this.
report1.ReportParameters["iId"].Value = "2";

But I am not able to set this value available members in datasource parameter value is setting 0. So how can i force to pass this code behind value to that datasource. Data is not displayed because of not passing value to my datasource storedprocedure.

Please give reply ASAP.

Thanks and Rgd's
Surendra Reddy.


1 Answer, 1 is accepted

Sort by
0
Unknown
Top achievements
Rank 1
answered on 24 Jan 2014, 04:27 PM
If your report parameter value is used in the data source then everything should work as expected. However note that if you are setting the value of the report parameter programmatically you will have to ensure that this is done at the right time, i.e. prior to rendering the report. So if you are passing the report to a report viewer for example make sure that the report parameter is set prior to passing the report source to the report viewer.
Tags
General Discussions
Asked by
Surendra
Top achievements
Rank 1
Answers by
Unknown
Top achievements
Rank 1
Share this question
or