Using Winforms, C#, .Net 3.5, and Microsoft ReportViewer 2008:
I have a 3 page report in ReportViewer that I want to send to PDF as different pages. I have the code below that will copy all 3 pages to PDF but is there a way of splitting up the pages or specifying which page to render into PDF? It knows there are 3 pages... so seems like there should be something but I've not found it yet.
Thanks for the help in advance!
int numPages = reportViewer.LocalReport.GetTotalPages();
byte[] bytes = reportViewer.LocalReport.Render(
"PDF", null, out mimeType, out encoding, out filenameExtension,
out streamids, out warnings);
using (FileStream fs = new FileStream(exportPath, FileMode.Create))
{
fs.Write(bytes, 0, bytes.Length);
}