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

Report parameters from controls on aspx page

3 Answers 153 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
20Below
Top achievements
Rank 1
20Below asked on 23 Mar 2011, 12:37 AM
Hi,
I'm new to Telerik and Telerik Reporting. I was wondering if someone could help me out. I have some RadControls and ASP .Net controls that I need to get values from in order to pass them as parameters to a report viewer.  On the Report itself I don't have the Value property set on any parameters, the parameters in question are boolean. I get the following error:
"An error has occurred while processing the report. Processing canceled. Check the InnerException for more information.
Invalid value of report parameter 'InfoSectionVisible'.
"
Where should I put the logic for grabbing the report parameters from controls on the aspx page so that when users hit the preview button the report reflects the user's input from the controls?
Thanks!

3 Answers, 1 is accepted

Sort by
0
20Below
Top achievements
Rank 1
answered on 23 Mar 2011, 02:53 AM
Problem solved, just put the logic in pageload and added an asp .net button to the page. Thanks!
0
engin
Top achievements
Rank 1
answered on 27 Apr 2011, 02:43 PM
Hi,
i was looking for the same problem then i saw your post. i need to handle reportviewer in aspx page like set custom parameter from asp.net controls. But i couldnt find out what i should do. if u solve the problem can u tell that what i need to do.

Thank you ..
0
20Below
Top achievements
Rank 1
answered on 27 Apr 2011, 03:12 PM
You basically have to grab the report from the viewer then set the parameters on Page Load like so:
Report myReport = (MyReportType)ReportViewer.Report;
myReport.ReportParameters["MyReportParameter"].Value = "This is your report parameter value";
Tags
General Discussions
Asked by
20Below
Top achievements
Rank 1
Answers by
20Below
Top achievements
Rank 1
engin
Top achievements
Rank 1
Share this question
or