REPORT:

Contents


Report is used to start the print of a Crystal Report report from a process.

Syntax

   Report param = id_serveur with liste_param

Parameters

Element

Description

Restrictions

param

 

 

id_serveur

identification of a print server as:
machine.domain@

list_param

List of id_param separated by the character ','.

The expressions must be alphanumeric and are limited to 255.

id_param

character string in the form:
"param="+chr$(1)+"param_value"

The expressions must be alphanumeric and are limited to 255.

Examples

# starting the ITMMASTER.RPT report
# son print server mach1.domaine1
# with output on printer
# with selection of products starting with the letter A
Local Char RETOUR(6)
Report RETOUR="mach1.domaine1@" With
& "__REPORT="+chr$(1)+"ITMMASTER.RPT",
& "__DESTINATION="+chr$(1) + "2",
& "__DBSERVER="+chr$(1) + "x73",
& "__DBPASSWORD="+chr$(1) + "PASSE",
& "__APPLICATION="+chr$(1) + "GX3APP;gailf40;1801",
& "__APPRPT="+chr$(1) + "GX3APP;gailf40;1801",
& "_PreVisuOptions="+chr$(1) + "11111111111111111111",
& "X3DOS="+chr$(1) + "GX3APP;gailf40;1801",
& "X3EDT="+chr$(1) + "Adonix",
& "X3ETA="+chr$(1) + "ITMMASTER",
& "X3TIT="+chr$(1) + "truc",
& "X3OPE="+chr$(1) + "Dupond",
& "itmrefdeb="+chr$(1) + "A",
& "itmreffin="+chr$(1) + "AZZZZZZZZZZZZZZZZZZZ"

# printing an attachment
Report "" With
& "__DOCUMENT="+chr$(1) + "C:\document.xls",
& "__APPLICATION="+chr$(1) + "GX3APP;gailf40;1801",

Description and comments

The statement Report is used to start the print of a report directly from a process. Used since version 130 to print an attachment.

Reports are on the server, in the sub-directory ETA of the current application or of one of the reference applications. The statement Report resets from the server report, if required, the report on the client workstation in directory Application_Serveur_Port.

The Crystal Report report can either be:

If the server is not specified, the print is sent to the current server.

The element param is an output parameter with the job number assigned to the print request. It is optional.

The parameters to be entered can be subdivided in three categories:

System parameters:

Parameter

Description

Value

__REPORT

Crystal reports report name

__DESTINATION

Destination of the print

0 = pre-view
1 = printer
2 = e-mail
3 = file

__TYPDBA

Database type

1 = Oracle
2 = SQL-Server

__DBSERVER

ODBC datasource

ODBC parameter of module SUP

__DBDATABASE

Name of the database

__DBUSER

Connection user to the database

__DBPASSWORD

Password to log on to the database

__APPLICATION

Name of the current application as:
Application;Serveur;Port

nomap;adxmac(-1);num$(adxtcp) or
nomap;adxmac(0);num$(adxtcp)

__APPRPT

Name of the application where the reports are located as:
Application;Serveur;Port

__REQUETE

Query number

uniqid([ARP])

_DOCUMENT

Attachment name

can be on client, e.g.: c:\doc.xls
or on server, the folder directory shall then be mentioned
e.g.: TXT/texte.rtf

_PreVisuOptions

Option for the pre-view

"11111111111111111111"

_EMailToList

Message recipients

_EMailCCList

Recipients to be copied for the message

_EMailSubject

Message subject

_EMailMessage

Message content

_PrinterDriver

Print driver

_PrinterName

Printer name

_PrinterPort

Printer port

_PrinterDescription

Printer description

_PrinterCopies

Number of copies

_PrinterStartPage

First page to be printed

_PrinterStopPage

Last page to be printed

_PrinterCollate

Printer collate

_Orientation

Portrait or landscape mode

_FormatExport

Format of the exported file

_ExportFile

Exported file name

_FormatDelString

String delimiter

_FormatDelRecord

Record delimiter

_FormatFileHTML

HTML file

Standard parameters:

Parameter

Description

Value

X3DOS

Name of the current application as:
Application;Serveur;Port

nomap;adxmac(-1);num$(adxtcp) or
nomap;adxmac(0);num$(adxtcp)

X3CLI

Title of the X3 folder

[V]GRAISON
(loaded by the DESAPP parameter of module SUP)

X3EDT

Editor information

mess(4,135,1)-mess(5,135,1)

X3ETA

Crystal reports report name

[F:ARP]RPTCOD

X3TIT

Report title

[F:ARP]DES

X3OPE

Report start operator

[F:AUS]NOMUSR

X3SIT1

Authorized sites

X3SIT2

Prohibited sites

Remarks

In the standard "ETA" print start process, the name of the print server is loaded by the SERIMP parameter of the supervisor module, when the print is sent to the printer.

New to version 130

additional parameters

     __DOCUMENT        for the attachments

    _ExportFile
   


For__DESTINATION = 3 (i.e the file), the _ExportFile parameter is used to mention the name of the file resulting from the export.
For__DESTINATION = 1 (i.e, the printer), the print will not be sent physically to the printer identified by the parameters "_PrinterDriver;_PrinterName;_PrinterPort;_PrinterDescription". It will be rerouted to the file specified by "_ExportFile" (type file "Raw Printer data" with PRN or PS extensions), using the PCL or PostScript driver identified via the parameters "_PrinterDriver;_PrinterName;_PrinterPort".

attachments

To print an attachment, 2 parameters are necessary and compulsory:
        __DOCUMENT
        __APPLICATION

The _DOCUMENT parameter can only contain one attachment.
The syntax on NT server is: \\server\path\document
The syntax on UNIX server is: /directory/document  (directory is the tree structure in the folder)

an attachment can be printed if the associated program permits it.

Generation of a log file (available since version 133)

For each print request with a "File" destination (see parameter __DESTINATION), a log file is generated after completion of the request in the directory "Temp" of the installation directory of the X3 client workstation (or the X3IMP print server). This log file is called "reportjobstatus.njob", with njob corresponding to the job number assigned to the print request (see description of the "param" parameter). If it is already present in the "Temp" directory, this log file is previously deleted at the beginning of the operation.

If the size of this file is null, the print request succeeded. Otherwise, the file contains the error message associated with the problem detected during execution.

This trace file can be used for prints submitted in batch or in delayed mode, in order to check the proper execution and completion of the request

New to version 140

For protocol purposes, a chr$(1) is now necessary in front of the value of each parameter.

A parameter is now expressed as:
"param="+chr$(1)+"param_value"

Associated errors

Error

Description

 

 

Associated keywords


CONTENTS

Copyright © Sage 1999 - 2007