Flex Report

kemelyon  FlexReport 0_2rc1 (LGPL)

  1. Layout  A4,A3,A4R (landscape)
  2. Print Preview
  3. Multipage Print

Demo ,  Source Here.

3 Issue Fixed

–  A4R print in source PaperFormat.as line 54

new PaperFormat([842, 595],“A4.Rotated”,[8.27,11.9],[210,297]);

–  Error: Error #2030: End of file was encountered  at flash.display::BitmapData/setPixels()

example code   refer to FlexReportDemo.mxml

  private function generateDocument():void
   var source:ReportDP = new ReportDP();
   var report:PortfolioReport = new PortfolioReport();
<span style="background-color: #ffff00;">   report.width = PaperFormat.A4R.width; // add this
   report.height = PaperFormat.A4R.height;// add this</span>
   doc = new Document(report, source, PaperFormat.A4R);
   doc.pdfEnabled = false;
   printPreview.doc = doc;
  private function initApplication():void
  printPreview.pdfExportEnabled = false;
<span style="background-color: #ffff00;">  printPreview.page.width = PaperFormat.A4.width; // add this
  printPreview.page.height = PaperFormat.A4.height; //add this</span>

– print blank page or grey rectangle in the upper right corner Issue.

if (printJob.start()) {
   <span style="background-color: #ffff00;">_template.height = printJob.pageHeight; // add this</span>
  <span style="background-color: #ffff00;"> _template.width = printJob.pageWidth;   // add this</span>
<a href="http://code.google.com/p/flexreport/source/browse/trunk/flexreport/org/doc/Document.as" target="_blank">ORIGINAL CODE HERE</a>

Leave a Reply

Your email address will not be published. Required fields are marked *

1 + nine =