Dim format As String = "PDF" Dim fileName As String = "C:\Output.pdf" Dim reportPath As String = "/[Report Folder]/Invoice" ' Prepare Render arguments Dim historyID As String = Nothing Dim deviceInfo As String = Nothing Dim extension As String = Nothing Dim encoding As String Dim mimeType As String = "application/pdf" Dim warnings() As Microsoft.Reporting.WinForms.Warning = Nothing Dim streamIDs() As String = Nothing Dim results() As Byte ReportViewer1.LocalReport.Render(format, deviceInfo, mimeType, encoding, fileName, streamIDs, warnings) ' Open a file stream and write out the report Dim stream As FileStream = File.OpenWrite(fileName) stream.Write(results, 0, results.Length) stream.Close()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)