Under the Report properties there is a Property for Columns.
I have changed this to two(2).
But the default report viewer will not show the columns, nor will they print the columns.
So I exported the report to a PDF and then printed that file.
private void Export(LocalReport report)
{
try
{
string deviceInfo =
@"<DeviceInfo>
<OutputFormat>PDF</OutputFormat>
<PageWidth>8.5in</PageWidth>
<PageHeight>11in</PageHeight>
<MarginTop>0.25in</MarginTop>
<MarginLeft>0.25in</MarginLeft>
<MarginRight>0.25in</MarginRight>
<MarginBottom>0.25in</MarginBottom>
</DeviceInfo>";
Warning[] warnings;
string[] streamIds;
string mimeType = string.Empty;
string encoding = string.Empty;
string extension = string.Empty;
m_streams = new List<Stream>();
byte[] bytes = report.Render("PDF", deviceInfo, out mimeType, out encoding, out extension, out streamIds, out warnings);
using (FileStream fs = new FileStream("output.pdf", FileMode.Create))
{
fs.Write(bytes, 0, bytes.Length);
}
foreach (Stream stream in m_streams)
stream.Position = 0;
}
catch (Exception ex)
{
Common.LogManager.WriteToLog(ex.Message + Environment.NewLine + ex.StackTrace);
}
}
and then to print i use the print dos command in a new process:
ProcessStartInfo psi = new ProcessStartInfo();
psi.UseShellExecute = true;
psi.Verb = "print";
psi.WindowStyle = ProcessWindowStyle.Hidden;
psi.FileName = "output.pdf";
Process.Start(psi);
The report printed exactly as I needed it to.