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

Report export after second render with different parameters

1 Answer 5 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
IT asked on 19 Jun 2013, 06:48 PM

i have created a reportserver. This allows to display several independant reports in the browser.
The initial reportparameters are filled in with values from the url
but those parameters can be changed.
when i export the second render result (with different parameter values) to pdf in the code behind, it always saves the document with the initial report parameters.
when i use the export function from the reportviewer, it is correct

Dim succesful As Boolean = False


 Dim reportProcessor As New Processing.ReportProcessor()

 Dim instanceReportSource As New InstanceReportSource()

 instanceReportSource = ReportSelection(true)

 Dim result As Processing.RenderingResult = reportProcessor.RenderReport("PDF", instanceReportSource, deviceInfo)

 Dim fileName As String '= result.DocumentName + "." + result.Extension

 Dim directoryPath As String = servername.MapPath("../docs/")


 Dim contextDirectory As New DirectoryInfo(directoryPath)

 If contextDirectory.Exists Then


end If

 Using fs As New System.IO.FileStream(directoryPath & fileName, System.IO.FileMode.Create)

 fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length)



end Using

any suggestions?




1 Answer, 1 is accepted

Sort by
Telerik team
answered on 24 Jun 2013, 04:42 PM
Hello Stijn,

From your code snippet it is not clear what is assigned to the InstanceReportSource and how parameters are passed to the report definition. Notice report parameters values can be passed through the report source object. Also if you use the parameters in the report's events, their current values can be taken from the processing equivalent of the report as explained in the Using Report Events help article.

If you need further help, let us know the report definition, how report parameters are used and set.


Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

General Discussions
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question