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

How to pass dynamic parameters to programatically?

1 Answer 377 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ashish Srivastava
Top achievements
Rank 1
Ashish Srivastava asked on 06 Dec 2009, 09:33 AM
Hi All,

I am trying to Show Detail of a student in a school, passing his roll number ( by click of student name in a telerik grid ) A report popup window shown with a combobox on top where list of all roll number is shown and I have to manually select the  roll number to display Student detail(which is coming from different tables).

I want to hide that combobox and want to pass parameter dynamically from variable.

Please suggest!


Thanks in advance
Ashish
Jayesh
Top achievements
Rank 1
commented on 07 Jul 2023, 01:50 PM

Hello All,
 I am facing same issue , I want to pass parameter dynamically from variable and want to show there details  by calling storeprocedure.

please suggest!

Thanks
Dimitar
Telerik team
commented on 12 Jul 2023, 11:26 AM

Hello Jayesh,

Please have a look at the Using Parameters with the SqlDataSource component explained - Telerik Reporting and Modify the Report Data Sources through code - Telerik Reporting articles for details on how to pass parameters to your stored procedure in code.

Let me know if you have any further questions.

1 Answer, 1 is accepted

Sort by
0
Chris Gillies
Top achievements
Rank 1
answered on 07 Dec 2009, 10:46 AM
The Report API (http://www.telerik.com/help/reporting/telerik.reporting-telerik.reporting_namespace.html) is exposed and available in your web app:

Telerik.Reporting.Report report = (Telerik.Reporting.Report)this.ReportViewer1.Report;
report.ReportParameters["StudentParam"].Value = <roll_number_value>;

if you do not have viewer assigned, instantiate the report to access the report parameters directly
Tags
General Discussions
Asked by
Ashish Srivastava
Top achievements
Rank 1
Answers by
Chris Gillies
Top achievements
Rank 1
Share this question
or