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
ali_alannahAsked:
Who is Participating?
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.