Reportviewer export to Excel Error

17 posts, 2 answers
  1. Vijayasarathi
    Vijayasarathi avatar
    11 posts
    Member since:
    Jun 2011

    Posted 06 Nov 2012 Link to this post

    Hi Team, 

    Issue : When I am trying to export to excel its getting request timeout error. 

    Description :
    Report viewer has 240 pages and it was loaded successfully and I can able to export PDF also. Only I am getting error when I am trying to export to Excel
    and when I am trying to debug through source code its working fine. Only I am facing this issue in Production (Live).
    we are using graph and table format as well. Please advise me to resolve this issue.


    -
    V S
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 08 Nov 2012 Link to this post

    Hi,

    If the problem only occurs on your server, this means that you're using a different web.config file with different timeout setting. Make sure the timeout of your web application and the connectionTimeout property of your sql server are set to enough time (e.g. 10 mins) so that the excel document can be generated properly. Have in mind that handling reports (be it with large data or large number of report items) usually requires additional resources in terms of powerful CPUs, and enough memory to handle all the operations. As far as the processing time and consumed memory is concerned, the complexity of the report layout, the complexity of the data calculations (aggregates, conditional formatting),  the rendering media, the size of the generated document (in pages), and the capabilities of the underlying machine are crucial.

    In general, Telerik Reporting is an embedded reporting engine, which primary goal is to analyze data and represent it in a human-readable format that is also suitable for printing. During this process, certain complex layout and paging rules are applied, so the great flexibility offered by the reporting engine comes at a price: increased processing times and memory footprint. You should agree that dumping millions of records from a database at once hardly fit in the category of report generation. Perhaps in your specific scenario another component such as our RadGrid control might be more appropriate, moreover our RadGrid control offers several export options.

    Regards,
    Steve
    the Telerik team

    HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

  3. Vijayasarathi
    Vijayasarathi avatar
    11 posts
    Member since:
    Jun 2011

    Posted 04 Dec 2012 Link to this post

    Hi Team,

                    As your suggetion, we tried everythig. System is getting the same issue. if the reports count is more than 200 than, its getting the timeout error. could you please suggest me to write customized code to export excel format.?
    and give me an  example code.  (in C#)

    Thanks
    VS
  4. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 05 Dec 2012 Link to this post

    Hello VS,

    To export a Telerik report from a Silverlight application without a Silverligh Report Viewer you have to instantiate the Telerik.Reporting.Service.SilverlightClient.ReportServiceClient class, which plays the role of proxy to the Telerik Reporting WCF Service. More information and sample code is available in the  Exporting Report in Silverlight help article.

    Greetings,
    Steve
    the Telerik team

    HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

  5. Vijayasarathi
    Vijayasarathi avatar
    11 posts
    Member since:
    Jun 2011

    Posted 21 Jan 2013 Link to this post

    Hi Steve,
    We have resolved that export to excel issue. Thanks a lot to you.
    and we got another issue on same exported excel file. That is, report viewer has the following colors for RED, GREEN,  YELLOW
    RGB - GREEN  [ 0,130,74 ]
    RGB - RED [212,146,18 ]
    RGB - YELLOW [ 222, 135 , 3 ]

    I can able to see the exact color in website. but when I am looking the exported excel file, it is showing as different colors.
    I have attached the screenshot. Please see and advise me.

    -
    V S
  6. Answer
    Steve
    Admin
    Steve avatar
    10941 posts

    Posted 22 Jan 2013 Link to this post

    Hi VS,

    You're most likely exporting to the binary XLS format, which has various limitations including such for the supported color palette. Those limitations are outlined in the Design Considerations for Excel Rendering help article.

    To avoid this limitation, use the new OpenXML format (XLSX) instead when exporting the report.

    Kind regards,
    Steve
    the Telerik team

    HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

  7. Vijayasarathi
    Vijayasarathi avatar
    11 posts
    Member since:
    Jun 2011

    Posted 24 Jan 2013 Link to this post

    Hi Steve,

        Issue Resolved. Thanks a lot.
  8. Vijayasarathi
    Vijayasarathi avatar
    11 posts
    Member since:
    Jun 2011

    Posted 25 Feb 2013 Link to this post

    Hi Steve,

    I have tried to install Open XML sdk in Local. it was working perfectly. I can able to export to excel (XLSX format)  with correct colors. 
    Meantime, we have some internal issue to install Open XML SDK on server. So, this issue is still with me. I couldn't pass to live. 

    Do you have any other solutions for (xls format).?  except install  Open XML SDK.. pls

    Thanks and regards.
    VS
  9. Answer
    IvanY
    Admin
    IvanY avatar
    417 posts

    Posted 28 Feb 2013 Link to this post

    Hi Vijayasarthi,

    Since we are relying on Open XML you will need the DocumentFormat.OpenXml assembly on your server.

    .XLS (binary format) supports only a limited count of colors and that is a restriction that has no workarounds. You will have to either add the forementioned assembly or to create your reports having in mind the color limitation imposed by Excel 97 -2003 format.

    Greetings,
    IvanY
    the Telerik team

    See what's new in Telerik Reporting Q1 2013. Register for the March 4 webinar to witness the impressive new visualizations in Telerik Reporting. Just for fun, 10 webinar attendees will be randomly selected to win a Telerik T-shirt and a $50 Gift Certificate to ThinkGeek. Register now! Seats are limited!

  10. Vijayasarathi
    Vijayasarathi avatar
    11 posts
    Member since:
    Jun 2011

    Posted 28 Feb 2013 Link to this post

    Hi 

    I added the  DocumentFormat.OpenXml assembly to my solution instead of install OpenXMLSDK on server. its working perfectly.

    Thanks a lot.  :)
     VS
  11. Scott Salyer
    Scott Salyer avatar
    14 posts
    Member since:
    Apr 2009

    Posted 15 Aug 2013 Link to this post

    I was told that there was a way to switch the export from ExcelML to HTML format which is supposed to be much faster when exporting a lot of pages. How does one accomplish that?
  12. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 20 Aug 2013 Link to this post

    Hello Scott,

    In the Rendering Extensions help article you can find a list with the available rendering formats. In order to use the HTML rendering extension you will have to export the report document programmatically as explained in the Exporting Report Programmatically help article(Exporting a report to a multi document format).

    I hope this helps.

    Regards,
    Stef
    Telerik

    Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

  13. Sandeep
    Sandeep avatar
    1 posts
    Member since:
    Jul 2012

    Posted 22 Nov 2013 Link to this post

    Hi Vijayasarthi,

    Can you please share a piece of code as i also have the same issue of exporting to excel. 

    Thanks,
    Sandeep
  14. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 22 Nov 2013 Link to this post

    Hello Sandeep,

    Both XLS and XLSX rendering extensions can be used as in the first code snippet of the the Exporting Report Programmatically help article(Exporting a report to a single document format) - just set the needed rendering extension name.

    In the case of XLSX you will need to add references to the DocumentFormat.OpenXml assembly as elaborated by my colleagues in this forum thread.

    Let us know if you have any further questions.

    Regards,
    Stef
    Telerik

    New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

  15. Vijayasarathi
    Vijayasarathi avatar
    11 posts
    Member since:
    Jun 2011

    Posted 27 Nov 2013 Link to this post

    Just  put this following dll in your project bin folder,
    DocumentFormat.OpenXml.dll
    Telerik.Reporting.OpenXmlRendering.dll

    xlsx format will load automatically. 


    You can enable / disable the export formats like below,

    <Telerik.Reporting>
        <Extensions>
          <Render>
            <Extension name="IMAGE" visible="false"></Extension>
            <Extension name="RTF" visible="false"></Extension>
            <Extension name="CSV" visible="false"></Extension>
            <Extension name="MHTML" visible="false"></Extension>
            <Extension name="XPS" visible="false"></Extension>
            <Extension name="XLS" visible="false"></Extension>
            <Extension name="PPTX" visible="false"></Extension>
            <Extension name="DOCX" visible="false"></Extension>
          </Render>
        </Extensions>
      </Telerik.Reporting>
  16. Gopi
    Gopi avatar
    3 posts
    Member since:
    Jan 2015

    Posted 13 Jan 2015 Link to this post

    Hi Team,

    I am using Telerik Reportviewer to show report, and when I am trying to export my report to PDF or Excel I am getting error. My report has approximately 200 pages. Is there anyway to increase time limit amount for this control in web.config or anywhere else?

    I have already increase amounts in IIS server.
    I am looking for solution to this error.
  17. Hinata
    Hinata avatar
    146 posts
    Member since:
    Dec 2013

    Posted 16 Jan 2015 in reply to Gopi Link to this post

    Hi Gopi

    Check the second post in this thread. It answers your question about increasing the time limit.
Back to Top