<< ibec_ExecSQLScript | IBEBlock | ibec_FormatFloat >>

ibec_ExportReport

Syntax

 function ibec_ExportReport(PreparedReport : variant; FileName : string; ExportType : integer; Options : string) : Boolean;

Description

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)

Options

The following additional export options are supported:

Background=TRUE|FALSEExport 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|FALSEOutput file compressing. It reduces file size but increases export time. Applicable for PDF export. Default value is TRUE.
EmbeddedFonts=TRUE|FALSEApplicable 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|FALSEApplicable 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|FALSEExport of empty lines, applicable for TXT export. Default value is FALSE.
Frames=TRUE|FALSEExport of text objects frames, applicable for TXT export. Default value is FALSE.
OEMCodePage=TRUE|FALSEResulting file OEM coding selecting. Applicable for TXT and CSV exports. Default value is FALSE.
PageBreaks=TRUE|FALSEExport 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|FALSETransferring 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|FALSEIncludes graphic images exporting possibility. Applicable for HTML, XLS and RTF documents. Default value is TRUE.
Navigator=TRUE|FALSEIncludes special navigator for fast navigation between pages. Applicable for HTML pages. Default value is FALSE.
Multipage=TRUE|FALSEEvery page of the report will be written to a separate file. Applicable for HTML documents. Default value is FALSE.
AsText=TRUE|FALSEApplicable 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|FALSEApplicable 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|FALSEFull compliance to report appearance. Applicable for XML, XLS and RTF documents.
CropImages=TRUE|FALSEAfter exporting blank area cropping will be performed along edges. Applicable for BMP, JPEG, TIFF and GIF export types. Default value is FALSE.
Monochrome=TRUE|FALSEMonochrome 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.

Example

 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

See also:
Report Manager
ibec_CreateReport
ibec_smtp_SendMail

back to top of page
<< ibec_ExecSQLScript | IBEBlock | ibec_FormatFloat >>