FICHIER

Description

This action is called before the display of the selection window for the export format, when the user wants to export the print to a file. This action is also called when a print is sent by email ; in this case the action MESSAGERIE will be used to create the message then the action FICHIER is used to choose the format of the file containing the print. In the case of sending a message, the name of the attachment file is not modifiable : it is the name of the Crystal Report report.

    [M]IMPRIME = 3    the chosen destination is : email

    [M]IMPRIME = 3    the chosen destination is : file:

Template

Report

Use

It is used to avoid the display of the export format selection window, by setting OK = 0.

The file name must be entered either in the principal entry screen for the parameters, or in the parameter  _ExportFile.

The export format must be entered in the parameter  _FormatExport. The available formats are referenced in the local menu 91 in X3. The values are shown in the grid shown below :

 Number for the formatFormat
 1Crystal Report report
 2Data interchange format
 3Word for Windows
 4Columns of values
 5Rich text (rtf)
 6Values separated by commas (CSV)
 7Values separated by TAB
 8Values separated by a character
 9ASCII text
 10ASCII paginated text
 11ASCII text separated by TAB
 12Lotus 1-2-3 (WKS)
 13Lotus 1-2-3 (WK1)
 14Lotus 1-2-3 (WK3)
15Excel 2.1
 16Excel 3.0
 17Excel 4.0
 18Excel 5.0
 19Excel 6.0
 20ODBC
 21HTML 3.2
 22Internet explorer 2 HTML
 23Netscape 2 HTML
 24HTML 4
 25Excel 7 (standard)
 26Excel 7 (extended)
 27Excel 8 (standard)
 28Excel 8 (extended)
 29PDF

For the format 8, it is possible to enter the following two parameters :

_FormatDelString                String deliminator

_FormatDelRecord              Field separator

 

Example

Direct export to print, in the TOTO file that is the the Word format.

$FICHIER
OK=0
NBPAR+=1:PARAMETRE(NBPAR) = "_ExportFile="+chr$(1)+"C:\tmp\TOTO.xls"
NBPAR+=1:PARAMETRE(NBPAR) = "_FormatExport="+chr$(1)+"27"
Return

 

Direct export to print, in the TOTO file that is the the format 8.

$FICHIER
OK=0
NBPAR+=1:PARAMETRE(NBPAR) = "_ExportFile="+chr$(1)+"C:\tmp\TOTO.xls"
NBPAR+=1:PARAMETRE(NBPAR) = "_FormatExport="+chr$(1)+"8"
NBPAR+=1:PARAMETRE(NBPAR) = "_FormatDelString="+chr$(1)+'"'
NBPAR+=1:PARAMETRE(NBPAR) = "_FormatDelRecord="+chr$(1)+chr$(13)+chr$(10)
Return