0
爲什麼ActiveReports打印空白頁?我在運行時檢查了下面代碼中的dataTable和memoryStream對象,並且它們都充滿了數據,所以我完全陷入了困境並在我的結尾。任何幫助將不勝感激。謝謝。爲什麼ActiveReports打印空白頁面?
using (var proposal Report = new Proposal()) //This is the ActiveReports object
using (PdfExport pdfExport = new PdfExport())
using (System.Data.DataTable dataTable = dataContext.GetViewProposal(proposalId))
{
proposalReport.DataSource = dataTable;
proposalReport.Run();
pdfExport.Export(proposalReport.Document, memoryStream);
memoryStream.Position = 0;
}
HttpContext.Response.AddHeader("content-disposition", "attachment; filename=proposal.pdf");
return new FileStreamResult(memoryStream, "application/pdf");
一些額外的信息:
本報告有一噸的子報告。我的老闆認爲這可能與頁邊空白之外的內容有關,但是我已確定所有內容都在頁邊空白處(設置爲0.25,上,左,右,下)。我甚至嘗試刪除主報表的詳細信息和頁腳部分中的所有子報表,試圖縮小範圍(因此唯一剩下的部分是主報表組頭中的四個靜態子報表),而且我仍然相同的結果,但有一個額外的空白頁面。
空白頁是否出現在您的子報告的中間或正好在其中一個之前/之後? – Stickman
整個報告只包含空白頁面。當前空白頁數是兩個。 – KSwift87
是分配給報告的子報表屬性?在主報告的報告開始時,subReport.Report = new SubReport1()。 –