Development > Script dictionary > Reports 

Use this function to capitalize on all the Crystal Reports that can be used from the Sage X3 application. In this report dictionary the following is entered:

  • the general characteristics,
  • the issue characteristics,
  • any associated processes,
  • the access rights,
  • the launch parameters,
  • the data sources when the report accesses tables of another folder.

A charter dedicated to the Crystal Reports development has been created: you can view the Crystal Reports charter documentation.

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

Header

Presentation

The header is used to identify the report and provide its general characteristics.

Close

 

Fields

The following fields are present on this tab :

Code identifying the current record.

  • Description (field ZRPTDES)

Enter the description of the relevant record.

This long description is used as a title in screens and reports.

Close

 

Tab General

Presentation

Use this tab to specify the information linked to the global management of the report.

Local report duplication

To modify a report locally, a user can duplicate a report in his/her sandbox. In order to duplicate the report in your sandbox and share this report with other users, follow these steps:

1. In the Crystal reports table, click Transfer in the Actions icon of the report line start. The 'Transfer request' status is displayed in the Status field.

2. Save the record. The 'Sandbox' status is displayed in the Status field. The report has been duplicated in your sandbox and you can modify the report. As long as a report is in your sandbox, no other user can modify the report.

3. In order to share the report with the other users:

  • If you have made modifications to the report, click on Commit in the Actions icon of the line start. The 'Commit request' status is displayed in the Status field.
  • If you did not make modifications to the report, click on Revert in the Actions icon of the line start. The 'Revert request' status is displayed in the Status field.

4. Save the record. The 'Shared' status is displayed in the Status field. The report is shared again with the other users.

Close

 

Fields

The following fields are present on this tab :

General

  • Active (field ENAFLG)

Select this check box to activate the current record.

Disabled records keep their content and setup but cannot be used (by recalling their code) on other records (documents, settings ...), or for mass processes.

The authorizations to a given function can prohibit the creation of an active record. In this case, the check box is disabled by default. It can only be modified by an authorized user or through a signature Workflow.

An activity code is used to:

  • make optional an element in the dictionary if the value associated with the activity code is null.
  • identify the specific/custom elements if they are marked with a code starting with X, Y or Z.
  • size a maximum number of lines when the activity code marks elements from a grid.

In this way, if the activity code is disabled, the marked element will not be useable, and the associated code (if any) will neither be generated nor can be activated.

  • Short description (field ZRPTSHO)

This title provides a description of the record.
It is used in some screens or reports when there is not enough space to visualize the long title.

  • Module (field MODULE)

Module using the report.

  • Group (field GRP)

Printing Group you want to associate the report to. Thanks to this information, you can launch the report from the print menu with the sub-menu RPTxx (where xxis the number of the element in local menu 97 for the field Group). The update of this information does not require the protection of an activity code.

Access rights to this group must be defined in the users management.

Language

  • Multi-language (field MULLAN)

When this box is checked, the report is generated in all the languages managed by the folder.

When this box is not checked, the report is only generated in the creation language.

Use this field to bind the report to one language (the creation language of the report).

Characteristics of departure

  • Type (field PRTNAT)

Upon launching the printing, the destination is defined:

  • by the 'add info formula', if it exists (in the Add info formula field),
  • or by the destination,
  • or by the type if the 'add info formula' and destination are not specified.

The type is used to determine a destination when the 'add info formula' and destination are not specified. Upon launching the printing, the supervisor determines the destination using the parameter linked to the given type. To each type corresponds a parameter, in which you must enter a destination.

Normal

PRT1 setup

Fax

PRT2 setup

Thermal

PRT3 setup

Color

PRT4 setup

SEEINFO The values of this local menu (Local menu 22) can be modified.

  • ZPL printer (field GESZPL)

When this box is checked, the report can be printed with a ZPL printer.

This code is used to identify the setup of a ZPL print. This is necessary so that this report can be printed on this type of print.

Indicate a destination record. This record contains the print characteristics.

  • Mandatory (field PRTOBL)

When this box is checked, you cannot modify the destination upon launching the printing of the report.

  • Linked prints (field IMPLIE)

The print server is a multi-processing server.It can thus process 'N' requests in parallel.However, a printer can only print one report at a time.

This means that if two reports are submitted to the same printer, at the same time and on the same print server, the whole Crystal Reports processing phase (SQL requests, formatting, etc...) will be blocked. Only the "paper" production phase is serialized.

This option is used to respect the definition order of reports in the dictionary record and/or when using a segmentation setup.

  • Add info formula (field PRTFRM)

Even when it is not entered, this field makes it possible to search for a destination by user and by status. When found, this destination will have priority over that specified in the Destination.

Upon printing, this field will be compared with the addition defined in the printer allocation function by user, in the allocation algorithm of the printer.

Example:

  • For report X, you have defined an addition with the value 'PAR' corresponding to printer Y.
  • The formula of report X contains the expression "PARAM(site)".
  • When printing the report, if the Site parameter is equal to PAR, the printer will be initialized to Y.

Scripts

  • Standard script (field TRTINI)

Processings in which it will be possible to write the additional sub-programs for the printing of this report.

These processings are run by the print procedure just before running the Crystal Reports.

They are used to:

  • initialize the variables defined in the report setup,
  • prepare the files before printing,
  • update fields in the database (i.e.: print checkbox).

These initialization processings are run for each report.

One process is dedicated to the standard development and another to specifics. The update of a specific/custom process does not require protection with an activity code. You can view this documentation here: Development Help.

  • Specific script (field TRTSPE)

 

Accessibility

  • Not executable (field EXEFLG)

If this box is checked, the status is not executed directly from the Print menu. This is the case when reports are directly linked to a function, with the value of print parameters taken from the function.

  • Batch only (field EXEBAT)

The update of this information does not require the protection by an activity code.

 

Grid Crystal report

  • Report name (field CRYCOD)

One to five reports are printed consecutively at the time of launching the print. The entry of the parameters for all the reports is grouped at the launch. A file is generated by report. They are named : file.ext, file_1.ext, file_2.ext, … file_n.ext. For each report the orientation (portrait/landscape) should be indicated. The initialization process is executed for each report.

  • Orientation (field ORIENT)

Portrait or landscape format. This information must be consistent with that entered in the Crystal Report. The update of this field does not require protection by activity code.

  • Paper size (field FORETA)
  • Status (field DEVSTA)

 

 

  • Date (field DEVDAT)

 

Authorizations

  • Authorization site (field AUZFCY)

Use the Site authorization checkbox to specify if the access to the report is controlled by site.

When the box is checked, you must enter the function concerned (Function field). You can indicate a generic RPTxx function where xx represent the print group.
SEEINFO The management of an authorization by site requires the Crystal Report to be designed so as to restrict the printing of data to the authorized sites.

 

This access code makes it possible to authorize or prohibit the execution of a report by a user.

Close

 

Action icon

Standard rerouting action

 

Close

 

Tab Parameter Definitions

Presentation

In this grid, define the parameters required for the execution of a Crystal Report.

Close

 

Fields

The following fields are present on this tab :

Grid Parameters

  • Parameter (field PARCOD)

This code will be used under Crystal Reports.

A selection window displays the whole set of parameters that already exist in the reports. When the concept is the same, it is thus advised to use the same parameter name.

Automating and norm for the parameters expressing a start and end range:

Enter only the start range. Its code must begin with the suffix "deb" or "str".

The parameter for the end range is generated with the same root as the start range and the suffix "fin" or "end". It is not displayed in the grid but has passed to Crystal.

  • Parameter title (field ZPARNAM)

Enter the description of the relevant record.

This long description is used as a title in screens and reports.

The field type is defined here.

The principal types are :

  • A: Alphanumeric
  • C: Short integer
  • L : Long integer
  • DCB: Decimal
  • D: Date
  • M: Local menu

Other predefined types exist. They are often linked to an appendix table (currency, dimension, etc.). Use the keyboard shortcut ESC + F12 or the Selection icon in order to open the types list.

  • Length (field PARLNG)

Used to define the length of a field when this field uses a generic data type where the length is not fixed. This is notably the case for the types A and DCB.

  • Menu (field PARNOLIB)

Defines the local menu number associated with the field defined on the line.

When a field is of the type local menu (from 1 to 255) corresponding to the rank of a title in a table named local menu, stored in the messages table APLSTD.

On entry or on display, the following are displayed according to the choices made in the user interface :

  • either a title can be chosen in a scrolling list commonly called a combo box
  • or a list of buttons.

The interest of this type of entry is that the list of choices is displayed in the user connection language.

Each local menu number characterises the list of available titles. For example, the local menu 1 corresponds to the choice No / Yes in this order. In this particular case, the user interface can also be a check box.

  • Value type (field PARSTREND)

Indicates if it is necessary to enter a value interval.

Automating and norm for the parameters expressing a start and end range:

Enter only the start range. Its code must begin with the suffix "deb" or "str".

The parameter for the end range is generated with the same root as the start range and the suffix "fin" or "end". It is not displayed in the grid but has passed to Crystal.

  • Ent (field PARSAI)

Indicate here if the parameter is enterable or not at the launch of the report.

  • First default (field PARDEF1)

It is possible to enter an expression that will be evaluated during the entry to initialize the parameter.

  • Last default (field PARDEF2)

 

  • Control (field PARCTL)

it is possible to enter a formula to control the entry of the parameter. The variable VALUE represents the entered parameter value.

It is possible to indicate here the code for a control table to verify the entry of a parameter.

  • Object/dependency parameter (field PARPAR)

Used to enter the first element of an object key, when this object includes a key with two components (i.e. table number for a miscellaneous table).

Specificity of a dependent miscellaneous table: this field is used to enter the master element of the "Master" miscellaneous table. In this case, the number of the miscellaneous table is to be entered in the Menu column.

  • Options (field PAROPT)

This field can be entered if the data type is linked to an object. This field is used to define one or several filtering options defined in the object. The supervisor controls the value entered in the parameter, according to the positioned filters. The selection window also takes filters into account. 

This access codes is used to prevent the entry and display of the parameter.

In fact, if the field is entered, only the users having this access code with the modification right can modify the parameter.

Segmentation

  • Segmentation parameter (field PARSEG)

Possibility to split the print over several print-outs as a function of the different values entered for the parameter declared in this field. It is necessary to define the major parameter for the report here.

This possibility for splitting the report is used to improve performances in very large reports.

Close

 

Tab Data

Presentation

If the report is based on at least a table of another folder, you must enter the data source linked to each additional folder, with the syntax "solution;folder". The folder must be a folder linked in the folder management. There can be up to 5 data sources. The entered folder is only a default value: the source can be modified on launching the printing. If the solution is not specified, the supervisor uses the current solution; the same goes for the folder. To reach the parent folder tables, you can use the GDOSX3 variable.

Then, for each data source, you must specify the tables used in the report. If a table is not referenced, it will be automatically linked to the data source of the current folder. Therefore, the tables of the current folder must not be referenced here.

The table name must be the one used in Crystal (i.e. the pseudonym name, if it exists).

The number of tables is limited to 10 (this limit is due to the print server).

A table name is limited to 200 characters.

Close

 

Fields

The following fields are present on this tab :

Grid Data sources

  • Description (field ZSRC)

If the report uses at least one table from another folder, there is an obligation to indicate the source of the data linked to each additional folder in the form "solution;folder". It is necessary that the folder is a folder linked in the folder management. The number of data sources is limited to 5. The folder entered is in fact, only a default value, because the source is modifiable at the launch of the print. If the solution is not indicated, the supervisor takes the current solution ; it is the same as for the folder. For the parent folder tables, the variable GDOSX3, available for all the product, can be used. For the X3 live folder tables, reached from another product (Geode GX, Abel X3, Paie), the variables GSOLCPT and GDOSCPT contain respectively the solution and the X3 folder.

  • Default folder (field DOSSIER)

 

Grid Tables

  • Table (field TBL)

Tables associated with one of the sources given above to access to another folder. A limit of 10 tables is to be respected. The name of a table is limited to 200 characters.

  • Description (field LIBTBL)

 

  • Number (field NUM)

Number identifying one of the data sources of the above grid.

  • Data source (field LIBNUM)

Enter the description of the relevant record.

This long description is used as a title in screens and reports.

Close

 

Creation of a Crystal Report

In order to create a Crystal Report, follow the steps detailed below:

1. Create the Crystal report by using the Crystal Designer tool on the customer workstation, in the RptDev directory.

2. Test the report with the Crystal Designer tool.

3. Create the dictionary record in X3.

4. Test the report with X3 by selecting the 'Report developer' mode in the Tools menu accessed from the main menu in client-server mode.

5. Transfer the report to the server, from the reports dictionary, in the Report name field in the contextual menu.

Modification of a Crystal Report

In order to modify a Crystal Report, follow the steps detailed below:

1. Transfer the report to the client, from the reports dictionary, in the Report name field in the contextual menu.

2. Modify and test the report using the Crystal Designer tool.

3. Test the report with X3 by selecting the 'Report developer' mode in the Tools menu accessed from the main menu in client-server mode.

4. Transfer the report to the server, from the reports dictionary, in the Report name field in the contextual menu.

Reports

By default, the following reports are associated with this function :

 AREPORT : Report dictionary

This can be changed using a different setup.

Specific Buttons

This button is used to launch the print of the current report directly from this function.

The following fields are included on the window opened through this button :

Block number 1

  • field OBJET

 

  • field CLES

 

Block number 2

  • From folder (field DOSORG)

Indicate the folder from which the record is going be copied. The possible syntaxes are described in the dedicated appendix.

  • All folders (field TOUDOS)

This option is used to copy the record to all the folders defined in the dictionary (ADOSSIER table from the current solution).

  • To folder (field DOSDES)

Indicate the folder in which the record is going be copied. The possible syntaxes are described in the dedicated appendix.

Close

This button is used to copy the dictionary for the report to another folder.

Menu Bar

Documentation / Paragraphs

This choice of menu allows to zoom to the documentation management, on the first documentation paragraph (if it exists) related to the current record.

Documentation / Links

This choice of menu allows to zoom on the dictionary link management function. This function allows to establish links between the current record and other records (for example links between functions and parameters). These links, dedicated for documentation purpose, allows the generation of documentation structure.

Documentation / Generation

This choice of menu allows to generate the documentation. Three types of generation can be separately or simultaneously started :

  • the generation of the structure of documentation from dictionary (tables ADOCUMENT, ADOCBLB, ADOCCLB).
  • the generation of the documentation itself from the previous table (they have been normally completed after the first generation).
  • the field help documentation generation.

The ranges and parameter proposed by default are defaulted according ti the current record, but they can be changed during the execution.

Error messages

In addition to the generic error messages, the following messages can appear during the entry :

Deletion impossible / key used in the xxx function

You are attempting to delete a dictionary record for a report that is used in this function.

Deletion impossible / key used in the xxx object

You are attempting to delete a dictionary record for a report that is used in this object.

Printer type incorrect

Once you have specified a destination, and this destination is a printer, the type entered on the screen must be consistent with that in the destination record.

Non-existent file

You are attempting to copy a Crystal Report report from the server to the client, but the report was not found on the server. This same control exists for the copy from the client to the server.

File exists, do you want to delete it ?

You are attempting to copy a Crystal Report report from the server to the client, but the report is already present in the client. This same control exists for the copy from the client to the server.  

Code already exists in line nnn

A setup code must be unique for a report.

Incorrect length

The length of a variable is controlled as a function of its type.

Type

Maximum length

Title

30

Short integer

4

Long integer

8

Characters

250

Date

4, 6 or 8 (authorized length)

Decimal

32 (for the integer and decimal section)

Local menu incorrect

A local menu associated with a parameter must not be contained in range 100 to 200 (included).

Local menu not defined

The local menu associated with a setup has not been defined as such.

Non-existent setup

The setup code entered for the segmentation must exist in the parameters table.

xxxx: link to folder not defined

The folder/solution defined in the data source is not declared in the current folder record, in the Linktab.

Tables used

SEEREFERTTO Refer to documentation Implementation