Blank page on retrieving report with simple data

Stimulsoft Reports.WEB discussion
Post Reply
_Sergey
Posts: 1
Joined: Mon Jul 16, 2012 7:34 am

Blank page on retrieving report with simple data

Post by _Sergey »

Hi. I get a blank page when exporting to PDF format.

Code: Select all

var report = new StiReport();
report.LoadDocument(Server.MapPath("~/Content/reports/report2.mrt"));
report.Render();
var stream = new MemoryStream();
report.ExportDocument(StiExportFormat.Pdf, stream);
byte[] byteInfo = stream.ToArray();
stream.Write(byteInfo, 0, byteInfo.Length);
stream.Position = 0;
return File(stream, "application/pdf", "report.pdf");
The report contains the ReportTitleBand with "Hello World" text field.
Thanks.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Blank page on retrieving report with simple data

Post by Vladimir »

Hello, Sergey

Please use the report.Load() method instead of report.LoadDocument().

The report.LoadDocument() method is used to load .mdc files (rendered reports).

Thank you.
Post Reply