Report Viewer which generate and send PDF file can't work on the server RRS feed

  • Question

  • User-656652919 posted


    I am having problem when running an EXE file created by VS2010 on the Server thru SQL Server Agent (Batch).

    It working well when running on the local PC / Laptop.

    Please help me to solve the problem below. See the Source Code below.

    Thanks & Regards,



    Dim rds As New ReportDataSource

    rds.Name = "rdsForReportViewer"

    Dim DriverNameParm As String

    Dim RegisterNumParm As String

    Dim OpenReadingParm As String

    rds.Value = DSViewer1.GetData(RegisterNumParm, DriverNameParm)

    rds.DataSourceId = "rdsForReportViewer"

    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 deviceInfo As String = Nothing

    Dim viewer As New ReportViewer()



    viewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Local

    viewer.LocalReport.ReportPath = "Net40_OdometerReadingForm.rdlc"




    Dim myparams As New List(Of ReportParameter)

    myparams.Add(New ReportParameter("DriverName", DriverNameParm))

    myparams.Add(New ReportParameter("RegisterNum", RegisterNumParm))

    myparams.Add(New ReportParameter("OpenReading", OpenReadingParm))


    Dim bytes As Byte()


         bytes = viewer.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warnings)

    Catch ex As Exception   

         ErrorEmail(ReportEmailAddress, ex.Message)   SQLConn.Close()

    Exit Sub

    End Try





    Wednesday, May 28, 2014 12:47 AM

All replies

  • User364480375 posted

    any error???

    Wednesday, May 28, 2014 4:51 AM
  • User-656652919 posted

    Sorry I forgot to inform the error message. That is "An error occurred during local report processing."


    Thursday, May 29, 2014 7:26 PM
  • User-656652919 posted

    Please help me ... to solve this problem ....

    Sunday, June 1, 2014 8:48 PM
  • Monday, June 2, 2014 5:26 AM
  • User-656652919 posted


    Thanks for your reply. I followed the instruction from your url, but the problem is still the same.

    Fyi. The EXE file of the Project save and run from Database Server that doesn't have IIS. The dabase server using ReportViewer 2010.

    Database and EXE file is in the same machine.

    It's working when running from local PC with local Database and ReportViewer 2010. Just run EXE file thru CMD.

    Please let me know your advice.


    Tuesday, June 3, 2014 12:38 AM
  • User-656652919 posted

    Somebody Please help me !!!

    Sunday, June 8, 2014 8:56 PM
  • User-656652919 posted

    Help me please !!!!

    Friday, July 11, 2014 2:04 AM