While at first glance this seems easy, export options are difficult to obtain. You can get the Reportviewer toolbar by simply doing the following:
Dim myToolStrip As ToolStrip = DirectCast(ReportViewer1.Controls.Find("toolStrip1", True)(0), ToolStrip)
... .Items, , , DropDownItems .
, - . , :
ReportViewer1.ShowExportButton = False
Dim newExportButton As New ToolStripButton("Export PDF", Nothing, AddressOf Me.ExportPDF, "newExport")
DirectCast(ReportViewer1.Controls.Find("toolStrip1", True)(0), ToolStrip).Items.Add(newExportButton)
:
Private Sub ExportPDF()
Dim warnings As Microsoft.Reporting.WinForms.Warning()
Dim streamids As String()
Dim mimeType As String = ""
Dim encoding As String = ""
Dim extension As String = ""
Dim bytes As Byte() = ReportViewer1.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warnings)
Dim fs As New IO.FileStream("C:\export.pdf", IO.FileMode.Create)
fs.Write(bytes, 0, bytes.Length)
fs.Close()
fs.Dispose()
End Sub