3
가로 또는 세로로 로컬 보고서를 인쇄하려고합니다. 미리보기없이 rdlc에서 가로/세로 인쇄
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 개 개의 다른 보고서 세로 모드 일 및 가로 모드에서 하나를 가지고 있지만, 나는 그것의 항상 세로로 인쇄, 페이지 폭 및 페이지 크기에 대한 변경 값 중요하지 않습니다. 11.7in과 8.3in 사이에서 너비와 높이를 바꾸었지만 항상 세로 모드로 인쇄했습니다.