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