Page 1 of 1
Export as jpeg
Posted: Wed May 16, 2012 7:23 am
by andiruddha
My report has multiple pages .
When I export it as JPEG or any image
Only first page is exported.
How can export all the pages
Export as jpeg
Posted: Thu May 17, 2012 3:01 am
by HighAley
Hello.
andiruddha wrote:My report has multiple pages .
When I export it as JPEG or any image
Only first page is exported.
How can export all the pages
When you export report to JPEG file, each page exports in a separate file.
If the report is exported to a stream, all images are put in one stream. In this case you could export each page to the separate stream with next code:
Code: Select all
StiJpegExportSettings es = new StiJpegExportSettings();
for (int index = 0; index < report.RenderedPages.Count; index++)
{
string pageNumber = (index + 1).ToString();
es.PageRange = new StiPagesRange(pageNumber);
MemoryStream ms = new MemoryStream();
report.ExportDocument(StiExportFormat.ImageJpeg, ms, es);
}
Tahnk you.