Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Call this method to set the document generation parameters.

Code Block
XFRX#INIT::Object.Setparams(tcOutputName, tcTempDirectory,
                     tlNotOpenViewer, tcCodePage, 
 
                   tlSilent, tlNewSession, tcTarget
                     [, tcArchive [, tlAdditive
  
                  [, tlDeleteFileAfter [,  tuAppend]]]])

XFRX#LISTENER::Setparams(tcOutputName, tcTempDirectory,
                         tlNotOpenViewer, tcCodePage, 
                         tlSilent, tlNewSession, tcTarget
                         [, tcArchive [, tlAdditive
                         [, tlDeleteFileAfter [,  tuAppend]]]])

Parameters

tcOutputName

 The name of the document to create

...

 If set to .T., the generated file is be deleted after it is copied to the archive (optional). 

tuAppend AnchorSetparams_tuappendSetparams_tuappend

 Specifies whether the generated document will be appended to an existing file. This parameter can be either logical, numeric or a string, with the following meaning:

...

OutputXFRX versionValues
PDF10.1.F., .T., 0, <page No.>, “R<page No.>”, “R<from>:<to>”
RTF16.1.F., .T., 0, <page No.>, “R<page No.>”, “R<from>:<to>”
FRTF16.1.F., .T., 0, <page No.>, “R<page No.>”, “R<from>:<to>”
PLAIN16.1.F., .T., 0, <page No.> - only for value 1.
NATIVE_FXLSX
NATIVE_PFXLSX
18.2.F., .T., 0, <page No.>, “R<page No.>”, “R<from>:<to>”
TIFF21.0.F., .T., 0, <page No.>, “R<page No.>”, “R<from>:<to>”

Remarks

Applies To: XFRX#INIT, XFRX#LISTENER

Return value

Number.

ValueDescription
0OK  - everything was ok, you can start processing reports.
-1Cannot load Word application.
-2The Word application version must be 2000 or higher.
-3Cannot create or open the output FILE (%1).
-4Unknown output target.
-5Hndlib.dll cannot be loaded (it is missing or an old version is used).
-6Xfrxlib.fll cannot be loaded (it is missing or invalid).  Please see Frequently asked questions if you are getting this error.
-7Zlib.dll cannot be loaded.
-8An old version of xfrxlib.fll is used.
-9Sorry, Word 2007 or higher is required for docx format!
-10The existing document is either corrupted or in an unsupported format.
-11Signature file not found.
-12Cannot use the signature file.
-13The output folder (%1) does not exist or you do not have write access.
-14The existing document use xref stream - it's no possibly append data.  (since XFRX 16.1)
-15Cannot load Excel application.  (since XFRX 17.0)
-16The Excel application version must be 2000 or higher.  (since XFRX 17.0)
-17PDFpassword not is valid. (since XFRX 17.1)
-18Not is possible append new data with password to pdf without password. (since XFRX 17.1)
-19File name (%1) not is valid. (since XFRX 17.2.1)

...

Info

You can retrieve the English message for the code returned with ErrorMessage() method.

Examples

Code Block
LOCAL m.lnErr
m.loXFRX=EVALUATE([xfrx("XFRX#INIT")])

* The generated report will be appended to the end of the existing document.
m.lnErr=m.loXFRX.SetParams(,,,,.T.,,"XFF",,,, .T.)

* The generated report will be inserted at the beginning of the existing document.
m.lnErr=m.loXFRX.SetParams(,,,,.T.,,"XFF",,,, 1)

* The generated report will be inserted to the existing document, between pages 4 and 5.
m.lnErr=m.loXFRX.SetParams(,,,,.T.,,"XFF",,,, 5)

* The generated report will be inserted between pages 4 and 6, replacing page 5.
m.lnErr=m.loXFRX.SetParams(,,,,.T.,,"XFF",,,, "R5")

* The generated report will be inserting between pages 3 and 9, replacing pages 4,5,6,7 and 8.
m.lnErr=m.loXFRX.SetParams(,,,,.T.,,"XFF",,,, "R4:8")

* The existing document will be overwritten.
m.lnErr=m.loXFRX.SetParams(,,,,.T.,,"XFF",,,, .F.) 

IF m.lnErr<>0
   ?m.loXFRX.ErrorMessage(m.lnErr)
ENDIF

...