ローカル レポートを横向きまたは縦向きで印刷しようとしています。
private void Export(LocalReport report)
{
Warning[] warnings;
m_streams = new List<Stream>();
var deviceInfo = new StringBuilder();
deviceInfo.AppendLine("<DeviceInfo>");
deviceInfo.AppendLine("<OutputFormat>EMF</OutputFormat>");
//"11.7in", "8.3in"
deviceInfo.AppendLine("<PageWidth>11.7in</PageWidth>");
deviceInfo.AppendLine("<PageHeight>8.3in</PageHeight>");
deviceInfo.AppendLine("</DeviceInfo>");
report.Render("Image", deviceInfo.ToString(), CreateStream, out warnings);
foreach (var stream in m_streams) { stream.Position = 0; }
}
ポートレート モードとランドスケープ モードの 2 つの異なるレポートがありますが、PageWidth と PageSize の値を変更しても、常にポートレートで印刷されます。幅と高さを 11.7 インチと 8.3 インチの間で交換しましたが、常に縦向きモードで印刷されます。