The Operation has timed out while exporting to PDF RRS feed

  • Question

  • HI all, i am facing this issue since long time, while i am running a report using below VB Code. i am getting opertion has timed out error at

    rptbytes = ReportViewer1.ServerReport.Render() in the below code

    i tried changing the execution time out but still no luck can someone please help me out with this.

     Dim war As Microsoft.Reporting.WinForms.Warning() = Nothing
                Dim streams As String() = Nothing
                Dim rptbytes As Byte()
                Dim mimetype As String
                Dim encoding As String
                Dim extension As String
                rptbytes = ReportViewer1.ServerReport.Render("PDF", Nothing, mimetype, encoding, extension, streams, war)
                Dim fs As New FileStream(filename, FileMode.Create)
                fs.Write(rptbytes, 0, rptbytes.Length)
                savereportfile = filename

    Wednesday, February 22, 2012 9:36 PM


  • Can you try setting the output parameter values to null and try again? You can check the VB code from : http://msdn.microsoft.com/en-us/library/ms252210(VS.80).aspx

    This has:

    Imports Microsoft.Reporting.WinForms
    Imports System.IO
    Public Class Form1
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            ReportViewer1.ProcessingMode = ProcessingMode.Remote
            ReportViewer1.ServerReport.ReportServerUrl = New Uri("http://SSRSServer/reportserver")
            ReportViewer1.ServerReport.ReportPath = "/AdventureWorks Sample Reports/Company Sales"
        End Sub
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            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 bytes As Byte()
            bytes = ReportViewer1.ServerReport.Render("PDF", Nothing, mimeType, _
                encoding, extension, streamids, warnings)
            Dim fs As New FileStream("c:\output.PDF", FileMode.Create)
            fs.Write(bytes, 0, bytes.Length)
       End Sub
    End Class

    Please let me know if this doesn't work.


    Chaitanya( Twitter | Blogs )

    Any documentation bug? Tell us about it at Connect. Please feel free to add any community comments in any of the MSDN/technet articles.
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, February 24, 2012 4:00 AM