This is a migrated thread and some comments may be shown as answers.

RenderReport creates a dump file

5 Answers 244 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Covertix
Top achievements
Rank 1
Covertix asked on 23 Jan 2014, 03:52 PM
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?

5 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 24 Jan 2014, 10:24 AM
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.

0
Covertix
Top achievements
Rank 1
answered on 26 Jan 2014, 08:57 AM
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?
0
Stef
Telerik team
answered on 29 Jan 2014, 07:46 PM
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.

0
Shankar
Top achievements
Rank 1
answered on 16 Feb 2015, 01:53 PM
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
0
KS
Top achievements
Rank 1
answered on 17 Feb 2015, 01:10 PM
Tags
General Discussions
Asked by
Covertix
Top achievements
Rank 1
Answers by
Stef
Telerik team
Covertix
Top achievements
Rank 1
Shankar
Top achievements
Rank 1
KS
Top achievements
Rank 1
Share this question
or