Added the PDF export function for MyReport and pdf export for myreport.

Source: Internet
Author: User

Added the PDF export function for MyReport and pdf export for myreport.
Generate a PDF third-party library AlivePDF

AlivePDF 0.1.5RC (For FB)

 

Sample Code of MyReportto PDF

// Add the custom PDF export button to ReportViewer. Instance in external mode

PrivatefunctionInitCustomButtons ():Void

{

VarExportPDF: ToolButton =NewToolButton ();

ExportPDF. width = 23;

ExportPDF. setStyle ("Icon", Asset. icon_file_000016 );

ExportPDF. toolTip ="Export PDF";

ExportPDF. addEventListener (MouseEvent. CLICK, OnExportPDF );

ReportViewer. Instance. CustomToolBar. addChild (exportPDF );

}

// Process exported PDF code

PrivatefunctionOnExportPDF (e: MouseEvent ):Void

{

Trace("Export PDF");

// Generate the page

VarPages: Array = myreport. ReportEngine. GeneratePages (

ReportViewer. Instance. Setting,

ReportViewer. Instance. TableData,

ReportViewer. Instance. ParameterData );

// Generate PDF

VarPdf: PDF =NewPDF ();

For each(VarPage: DisplayObjectInPages)

{

Pdf. addPage ();

Pdf. addImage (page,NewResize (

Org. alivepdf. layout. Mode. RESIZE_PAGE,

Org. alivepdf. layout. Position. LEFT ));

}

VarBytes: * = pdf. save (org. alivepdf. saving. Method. LOCAL );

VarFile: FileReference =NewFileReference ();

// Save it to the local device. The method must be Flash player 10 or later.

File. save (bytes,"Export1.pdf");

}

Note: The above code is only one way to introduce it. You can modify it based on your actual situation.

 

 

Exported PDF results

 

 

How to obtain MyReport

MyReport Report Engine download link and related article Index

 

Related Articles

MyReport demo, product website


MyReport Column




How can Jatools Open report shield PDF and WORD export functions ??

Cnvbnbn
 
Where can I export pdf files?

Adobe reader or adobe acrobat?
Adobe acrobat is powerful and can be exported in many formats. In "file-> export ",

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.