RenderReport creates a dump file

6 posts, 0 answers
  1. Covertix
    Covertix avatar
    96 posts
    Member since:
    Aug 2008

    Posted 23 Jan 2014 Link to this post

    I have a c# dll file which creates a pdf report.
    I use:
    Log("start rendering")
                    Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
                    Telerik.Reporting.Processing.RenderingResult auditAsPdf = reportProcessor.RenderReport("PDF", report, null);
    Log("finish rendering")


    my application creates dump file in runtime, so I added logs, and I see the first log print but I don't get the "finish" print.
    right after I get your print: *** ReportProcessor.Render DONE in 00:00:02.6466816 *** in debug view, the dump file is created.

    I use TelerikReporting 3.1.9.701

    Any ideas why?

  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 24 Jan 2014 Link to this post

    Hi Tzach,

    We tested to export programmatically with the code below and Telerik Reporting Q2 2009 version 3.1.9.807, and the result was successful producing of PDF document from the given report definition (the BarcodesReport demo in the case):
    Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
    Telerik.Reporting.Processing.RenderingResult auditAsPdf = reportProcessor.RenderReport("PDF", reportDocument, null);
    string fileName = auditAsPdf.DocumentName + "." + auditAsPdf.Extension;
    string path = "C:\\";
    string filePath = System.IO.Path.Combine(path, fileName);
     
    using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
    {
        fs.Write(auditAsPdf.DocumentBytes, 0, auditAsPdf.DocumentBytes.Length);
    }

    Please, double-check if the used report definition is correct and its data is supplied correctly.

    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.

  3. Covertix
    Covertix avatar
    96 posts
    Member since:
    Aug 2008

    Posted 26 Jan 2014 in reply to Stef Link to this post

    Hi Stef, thank you!

    It works for me too on some computers, but there is one that creates a dump.
    Do you have any idea why? Do you have any minimum requirements of memory or disk space in order to run?
  4. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 29 Jan 2014 Link to this post

    Hello Tzach,

    Depending on the amount of data to be processed and report layout, the machine should have capacity to load in memory the data and the newly generated resources until the report document is generated. an empty PDF can be produced by various reasons - no assigned data source, not set culture for localized report without default values in the resx file, not installed fonts on the server.

    Compare the reports settings with other report definitions, not having this issue..

    If you need further help, share the report definition code, and details for any customizations appearing before export.

    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.

  5. Shankar
    Shankar avatar
    9 posts
    Member since:
    Jun 2013

    Posted 16 Feb 2015 in reply to Stef Link to this post

    Hi,
    I am using the export report like...
    RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, null);
    after that...
    string sFileName = "MyReport.pdf";
    string path = System.IO.Path.GetTempPath();
                    string filePath = System.IO.Path.Combine(path, sFileName);

                    using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
                    {
                        fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
                    }
    sendMail();

    and then send the report in email as attachment...

    But when I see the pdf file in mail attachment few items are missing like item count 100 and again I run the process it shows 102 items actual 110 items are there.

    and then I use
    System.Threading.Thread.Sleep(20000);

    next to renderreport() method. like....
    RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, null);
    System.Threading.Thread.Sleep(20000);
    string sFileName = "MyReport.pdf";
    string path = System.IO.Path.GetTempPath();
                    string filePath = System.IO.Path.Combine(path, sFileName);

                    using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
                    {
                        fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
                    }

    sendMail();

     and get the correct result 110 items are shown.

    Please tell me the correct code for it.
    I guess the sendMail() function fire while the renderreport not finished the job.

    Thanks
    Chandan
  6. KS
    KS avatar
    165 posts
    Member since:
    Oct 2012
Back to Top