Blank page on retrieving report with simple data
Posted: Mon Jul 16, 2012 7:45 am
Hi. I get a blank page when exporting to PDF format.
The report contains the ReportTitleBand with "Hello World" text field.
Thanks.
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");
Thanks.