[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1636
  • Last Modified:

ReportViewer Auto export pdf as a file

Hello
I'm using VB.net windows form , VS 2010
I have Reportviwer control i need programtically the report exported as a PDF file and be saved in a specific  local folder
0
ali_alannah
Asked:
ali_alannah
1 Solution
 
lluddenCommented:
Here is a snippet from one of my apps

        Using rpt As New Microsoft.Reporting.WinForms.LocalReport()
            Dim bsReportSource As New BindingSource
            Dim ReportDataSource2 As Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource() With {.Name = "ReportDataTable", .Value = bsReportSource}
            bsReportSource.DataSource = dt
            rpt.DataSources.Add(ReportDataSource2)
            rpt.ReportEmbeddedResource = "myreport.rdlc"
            rpt.SetParameters(rptParam)
            rpt.ExportPDF(tempManifest)
            bsReportSource.Dispose()
        End Using
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now