RpReport:PrintExport() Method

<< Click to Display Table of Contents >>

Navigation:  RpReport Class >

RpReport:PrintExport() Method

Previous pageReturn to chapter overviewNext page

Purpose

Print the report to an export format.

Syntax

<oRpReport>:PrintExport(cCaption, cMessage, [symExport], [cFile])  NIL

Arguments

cCaption

The caption displayed on the Print Export window.

cMessage

The message string displayed on the dialog window presented to the user during export.  

symExport

Optional parameter to specify a specific export type to use.  If this is not specified, the user is prompted for an export format to use.

If this parameter is specified, the <cFile> parameter is required as well.

Currently supported types are:

#RP_RTF_WORD95 (creates rich text format compatible with Microsoft Office 6)

#RP_RTF_WORD97 (creates rich text format compatible with Microsoft Office 97)

#RP_HTML (creates hypertext markup language output)

#RP_ASCII (creates vanilla text output)

#RP_PDF (creates a simple PDF format)

#RP_EXCEL (creates a simple Excel format)

cFile

Optional filename for export file.  This parameter is required if <symExport> is specified.

Example

METHOD ExportReport() CLASS StandardShellWindow

 

LOCAL oReport AS RpReport

LOCAL cCaption, cMessage AS STRING

 

oReport := RpReport{SELF, "C:\RP2\SAMPLES\BIT.RPT"}

IF oReport:IsValid

 cCaption            := "My App Name"

 cMessage            := "Export to HTML in progress..."

 oReport:PrintExport(cCaption, cMessage, #RP_HTML, "myfile.htm")

ENDIF

oReport:Close()

 

Notes

When using the PDF Export you can specify fonts that should not be embedded in the PDF file. You can also set options for the name, author etc.

When using the Export Selection dialog, you can set that using the 'Advanced' button. You can also set that in the rpwin.ini file. An example :

 

[PDFOutPut]
Title=Title
Subject=Subject
Author=Author
Keywords=Keywords
Creator=Application
Compressed=1
EmbedFonts=1

 
[PDFDoNotEmbed]
Arial=
Arial Bold=
Arial Bold Italic=
Arial Italic=
Times New Roman=
Times New Roman Bold=
Times New Roman Bold Italic=
Times New Roman Italic=
Courier New=
Courier New Bold=
Courier New Bold Italic=
Courier New Italic=
WingDings=