function ibec_ExportReport(PreparedReport : variant; FileName : string; ExportType : integer; Options : string) : Boolean;
ibec_ExportReport exports report, created with the IBExpert Report Manager and prepared using the ibec_CreateReport function, into a specified format.
The following export types are supported as value of the ExportType parameter:
__erPDF (= 0) __erTXT (= 1) __erCSV (= 2) __erHTML (= 3) __erXLS (= 4) __erXML_XLS (= 5) __erRTF (= 6) __erBMP (= 7) __erJPEG (= 8) __erTIFF (= 9) __erGIF (= 10)
The following additional export options are supported:
Background=TRUE-FALSE | Export of graphic image assigned to a page into result file. It considerably increases output file size. Applicable for PDF, HTML, XLS, XML export types. Default value is FALSE. |
Compressed=TRUE-FALSE | Output file compressing. It reduces file size but increases export time. Applicable for PDF export. Default value is TRUE. |
EmbeddedFonts=TRUE-FALSE | Applicable for PDF export type. All fonts used in report will be contained in the PDF output file for correct file displaying on computers where these fonts may be absent. Output file size increases considerably. Default value is FALSE. |
PrintOptimized=TRUE-FALSE | Applicable for PDF export type. Output of graphic images in high resolution for further correct printing. This option enabling is necessary only when the document contains graphics and its printing is necessary. It considerably increases output file size. Default value is FALSE. |
EmptyLines=TRUE-FALSE | Export of empty lines, applicable for TXT export. Default value is FALSE. |
Frames=TRUE-FALSE | Export of text objects frames, applicable for TXT export. Default value is FALSE. |
OEMCodePage=TRUE-FALSE | Resulting file OEM coding selecting. Applicable for TXT and CSV exports. Default value is FALSE. |
PageBreaks=TRUE-FALSE | Export of page breaks to resulting file. Applicable for TXT export type. Default value is TRUE. |
Separator=<string> | Values separator. Default value is semicolon (;). To avoid incorrect parsing of the options string double quote a separator value: Separator=“,” |
ExportStyles=TRUE-FALSE | Transferring of text objects design styles. Disabling increases exporting but worsens document appearance. Applicable for HTML, XLS and XML documents. Default value is TRUE. |
ExportPictures=TRUE-FALSE | Includes graphic images exporting possibility. Applicable for HTML, XLS and RTF documents. Default value is TRUE. |
Navigator=TRUE-FALSE | Includes special navigator for fast navigation between pages. Applicable for HTML pages. Default value is FALSE. |
Multipage=TRUE-FALSE | Every page of the report will be written to a separate file. Applicable for HTML documents. Default value is FALSE. |
AsText=TRUE-FALSE | Applicable for XLS export type. All objects are transferred into table/diagram as text ones. This option may be useful when transferring numeric fields with complicated formatting. Default value is FALSE. |
MergeCells=TRUE-FALSE | Applicable for XLS export type. Cells integration in resulting table/diagram for achieving maximum correspondence to the original. Disabling increases exporting but reduces document appearance. Default value is TRUE. |
Wysiwyg=TRUE-FALSE | Full compliance to report appearance. Applicable for XML, XLS and RTF documents. |
CropImages=TRUE-FALSE | After exporting blank area cropping will be performed along edges. Applicable for BMP, JPEG, TIFF and GIF export types. Default value is FALSE. |
Monochrome=TRUE-FALSE | Monochrome picture creating. Applicable for BMP, JPEG, TIFF and GIF export types. Default value is FALSE. |
JPEGQuality=<integer> | JPEG file compression ratio. Applicable for JPEG files. Default value is 90. |
Quality=<integer> | Same as JPEG quality. |
execute ibeblock as begin Params['HeaderMemo'] = ''; Params['MEMO2'] = 2; SELECT IBE$REPORT_SOURCE FROM ibe$reports where ibe$report_id = 4 into :RepSrc; Report = ibec_CreateReport(RepSrc, Params, null); ibec_SaveToFile('D:\reptest.fp3', Report, 0); Res = ibec_ExportReport(Report, 'D:\reptest.pdf', __erPDF, 'EmbeddedFonts=TRUE'); Res = ibec_ExportReport(Report, 'D:\reptest.jpg', __erJPEG, 'CropImages; Quality=90'); end