【发布时间】:2020-02-26 00:48:37
【问题描述】:
我正在将此 DeviceInfo 传递给报告:
<DeviceInfo>
<OutputFormat>Word</OutputFormat>
<PageWidth>11in</PageWidth>
<PageHeight>8.5in</PageHeight>
<MarginTop>1in</MarginTop>
<MarginLeft>0.5in</MarginLeft>
<MarginRight>0.5in</MarginRight>
<MarginBottom>1in</MarginBottom>
</DeviceInfo>
但是,当报表呈现(Word 或 PDF)时,页面大小为 11 x 11 英寸,而不是 11 x 8.5(横向)。为什么是这样?如何让报表以适当的大小呈现?
这里是我呈现报告的地方:
byte[] bytes = Report.Render( // Report is an instance of the Microsoft.Reporting.WebForms.LocalReport class
reportType,
deviceInfo, // this contains the XML above
out mimeType,
out encoding,
out fileNameExtension,
out streams,
out warnings);
【问题讨论】: