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

Retrieving set report parameters from web reportviewer

1 Answer 49 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 15 Jul 2015, 12:30 PM

Hi,

I need some help retrieving the active set report parameters from a web report viewer.

I have a aspx page with the report viewer on it, in addition to the viewer I also have a custom email button. When the user clicks on that button I would like to sent a mail with the current report as a attachment. Problem with that is that when the user changes a few report parameters I have to apply those changes to report before I create the PDF file.

The creation of the PDF file I'm doing with the report processor:

Dim reportProcessor As New Processing.ReportProcessor()
Dim deviceInfo As New Hashtable()
Dim instanceReportSource = reportViewer.ReportSource
Dim result As Processing.RenderingResult = reportProcessor.RenderReport("PDF", instanceReportSource, deviceInfo)​

 Problem with the code above is that the parameters of the report viewer report source are the original parameters and not the ones who the user has changed.

 Anyone suggestions how I can send the displayed report as a PDF attachment in a mail?

 

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 20 Jul 2015, 08:43 AM
Hello Thomas,

Check the ReportViewer.ReportSource.Parameters collection for report parameters and pass them to the report as described in this thread.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Thomas
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or