Monday, 29 October 2012
Reports to PDF
Create the Instance of the SrsReportRun class
SRSReportRun rr = new SRSReportRun("ReportName here");
rr. init();
change the report printing destination as follow
// print to file
rr.printDestinationSettings().printMediumType(SRSPrintMediumType::File);
// file type
rr.printDestinationSettings().fileFormat(SRSReportFileFormat::PDF);
// overwrite the file or not
rr.printDestinationSettings().overwriteFile(true);
// give the file name
rr.printDestinationSettings().fileName(filePath);
// if u want to print all the pages set to true else false
rr.printDestinationSettings().printAllPages(false);
// if u want to print specified pages set the page ranges
rr.printDestinationSettings().fromPage(PageNo);
rr.printDestinationSettings().toPage(PageNo);
// run the report
rr.run();
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment