Private Sub btnPDF2_Click(sender As Object, e As EventArgs) Handles btnPDF2.Click Dim warnings As Warning() = Nothing Dim streamids As String() = Nothing Dim mimeType As String = Nothing Dim encoding As String = Nothing Dim extension As String = Nothing Dim bytes As Byte() Dim ReportViewer3 As New Microsoft.Reporting.WinForms.ReportViewer() Dim ReportDataSource1 As Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource() ReportViewer3.ProcessingMode = ProcessingMode.Local ReportDataSource1.Name = "JewelsDataSet" ReportDataSource1.Value = Me.StoreBindingSource ReportViewer3.LocalReport.DataSources.Add(ReportDataSource1) ReportViewer3.LocalReport.ReportEmbeddedResource = "ReportTest2.StoreRpt.rdlc" ReportViewer3.RefreshReport() bytes = ReportViewer3.LocalReport.Render("PDF", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing) Dim fs As New FileStream("c:\outputvb.pdf", FileMode.Create) fs.Write(bytes, 0, bytes.Length) fs.Close() End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)