ReportViewer Auto export pdf as a file

Posted on 2011-05-03
Last Modified: 2012-05-11
I'm using 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
Question by:ali_alannah
    1 Comment
    LVL 18

    Accepted Solution

    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.ReportEmbeddedResource = "myreport.rdlc"
            End Using

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now