Render PDF with ReportViewer Control

I'm using ASP.NET 2.0 and Reporting Services 2005. I'm trying to use the ReportViewer control to generate a report in a PDF format server side. Here is the code to generate the report in HTML format:

Dim params(1) As ReportParameter
params(0) = New ReportParameter("param1", "param1")
params(1) =
New ReportParameter("param2", "param2")

With rvDisplay
.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
.ServerReport.ReportServerUrl =
New Uri(http://server/vdir/)
.ServerReport.ReportPath = "/folder/report"
.ServerReport.SetParameters(params)
.ShowParameterPrompts =
False
.ServerReport.Refresh()
End With

Does anyone know how to generate this as a PDF or other format dynamically. It used to be with the old ReportViewer.dll you could set a property called ".Format", but that isn't available in this version. I appreciate any help.



Answer this question

Render PDF with ReportViewer Control

  • Noddy

    You are looking for .ServerReport.Render()
  • mralx

    There are many samples using the report viewer at www.gotreportviewer.com.
  • Carole Akoury

    Is there any chance that you have any code examples
  • Render PDF with ReportViewer Control