Main methods
ErrorMessage() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Syntax: lnRetVal = loXFRXobj.ErrorMessage(lnErrorNo) This method returns a error message corresponding to the value returned from SetParams() method. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Setparams()
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Call this method to set the document generation parameters. Syntax: lnRetVal = loXFRXobj.SetParams(<tcOutputName>, <tcTempDirectory>, <tlNotOpenViewer>, <tcCodePage>, <tlSilent>, <tlNewSession>, <tcTarget>, <tcArchive>, <tlAdditive>, <tlDeleteFileAfter>, <tuAppend>) Return values: 0 ... everything was ok, you can start processing reports Error code -14 is obsolete from XFRX 18.1.
You can retrieve the English message for the code returned with ErrorMessage() method. Parameters: tcOutputName tcTempDirectory tlNotOpenViewer tcCodePage tlSilent tlNewSession tcTarget tcArchive tlAdditive Please note: you can add several files to the archive, but existing files with the same name will not be overwritten - the new files will always be added. tlDeleteFileAfter tuAppend
Examples:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SetOtherParams(…) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This method is used to add various output type specific parameters. The first parameter is a string value representing the parameter to be set, the second parameter is the values to be set. Example: To set the next sheet name in the XLS document to “Customer 1”, call: .SetOtherParams("NEXT_SHEET_NAME", "Customer 1")
HTML specific parameters
Plain text specific parameters
Please find more information about plain text parameter in Converting reports to plain text chapter on page 41.
XLS, XLSPLAIN, NATIVE_FXLS, NATIVE_PFXLSX, ODS,FODS, PFODS specific parameters
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Finalize() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This method finishes the document generation and displays the generated document (unless the document preview was explicitly suppressed). The Finalize() method does not have to be called in VFP 9.0, if the last REPORT FORM command doesn’t contain the NOPAGEEJECT clause. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
initLog() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This method create log file with name "_XFRX.log". Syntax = loXFRXobj.initLog(<tlSilent>) Parameters: tlSilent | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
setLogFile() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This method create log file with name <tcLogFile>. Syntax = loXFRXobj.setLogFile(<tcLogFile>, <tlSilent>) Parameters: tcLogFile tlSilent |
Methods for registering page bound XFF scripts
RegisterScript() | |
---|---|
Syntax: RegisterScript(toScriptObject, tcScriptMethod, tnZOrder, tcPageScope, tnNumberingType) Parameters: toScriptObject tcMethodName tnZIndex tcScope tnPageNumberingType | |
UnregisterAllScripts () | |
Syntax: UnregisterAllScripts() If multiple reports are merged together and you would like to apply scripts on a certain report but not on subsequent ones, call this method to remove all scripts registrations. This method does not need to be called at the end of the reports processing. |
Page size adjustment methods
setPaperSize() | |
---|---|
Use this method to define a user-define page size. Syntax: setPaperSize(nUDPaperWidth, nUDPaperHeight[,nUDPaperOrientation] ) Please see User-defined page size paragraph on page 18 (nad) for more information. nUDPaperWidth nUDPaperHeight nUDPaperOrientation | |
ShrinkHeight() | |
Use this method to shorten the page size. Please see HTML page size adjustment na stránce 34 for more information. |
Methods to define document encryption
setPasswords() | |
---|---|
Sets passwords for PDF and Word document protection. PDF syntax: setPasswords(tcOwnerPassword, tcUserPassword) Parameters: The user password (tcUserPassword) can be empty. If the owner password (tcOwnerPassword) is empty, a random string will be generated as the password. Word syntax: setPasswords(tcReadPassword, tcWritePassword, tlRequirePassword) You can omit either tcReadPassword or tcWritePassword. tlRequirePassword is optional (default value is .F.). If set to .T., Word will ask for the password even when the document is being opened first time after the generation (if DoNotOpenViewer property is set to .F.). | |
setPermissions() | |
Sets the user permissions in the PDF document. Syntax: setPermissions(tlPrintDocument, tlModifyDocument, tlCopyTextAndGraphics, tlAddOrModifyAnnotations) |
Methods to set document properties
setAuthor() | |
---|---|
Sets the document author property. Syntax: setAuthor(tcvalue) Parameters: tcValue (char) is a value that will be used in the document properties. | |
setCategory() | |
Sets the document “Category” property. Syntax: setCategory(tcvalue) Parameters: tcValue (char) is a value that will be used in the document properties. | |
setComments() | |
Sets the document “Comments” property. Syntax: setComments(tcvalue) Parameters: tcValue (char) is a value that will be used in the document properties. | |
setCompany() | |
Sets the document “Company” property. Syntax: setCompany(tcValue) Parameters: tcValue (char) is a value that will be used in the document properties. | |
setCreator() | |
Sets the document “creator” property. Syntax: setCreator( tcValue ) Parameters: tcValue (char) is a value that will be used in the document properties. | |
setKeywords() | |
Sets the document “keywords” property. Syntax: setKeywords(tcValue) Parameters: tcValue (char) is a value that will be used in the document properties. | |
setManager() | |
Sets the document “Manager” property. Syntax: setManager(tcValue) Parameters: tcValue (char) is a value that will be used in the document properties. | |
setProducer() | |
Sets the document “producer” property. Syntax: setProducer(tcValue) Parameters: tcValue (char) is a value that will be used in the document properties. | |
setSubject() | |
Sets the document “Subject” property Syntax: setSubject(tcValue) Parameters: tcValue (char) is a value that will be used in the document properties. | |
setTitle() | |
Sets the document title property. Syntax: setTitle(tcValue) Parameters: tcValue (char) is a value that will be used in the document properties. | |
setCreationDate() | |
Sets the document creation date property (since XFRX 16.0). Syntax: setCreationDate(tdValue) Parameters: tdValue (date/datetime) is a value that will be used in the document properties. |
Attachments methods
AddAttachment() | XFRX | |||
---|---|---|---|---|
| Add attachment to list Syntax: AddAttachment(m.lcFileName, m.llEmbedded, m.lcDescription, m.lcFileType, m.lcRelationship ) Please see User-defined page size paragraph on page 18 (nad) for more information. m.lcFileName File name m.llEmbedded Embedded flag (must be true) m.lcDescription File description m.lcFileType MIME type m.lcRelationship Must be "Alternative" | 17.3 | ||
ClearAttachments() | ||||
Clear attachments list. | 17.3 |