I am trying to print a local report in either landscape or portrait.
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; }
}
I have 2 different reports one in portrait mode and one in landscape mode but it doesn't matter what values I change for PageWidth and PageSize, its always printing in portrait. I've swapped width and height between 11.7in and 8.3in but its always printing in portrait mode.