Development > Script dictionary > Reports 

This function is used to capitalize on the group of Crystal Report reports that can be used from one of the products in the X3 range. In this reports dictionary, the following are entered :

  • The general characteristics
  • The characteristics of the issue
  • Any associated processes
  • The access rights
  • The launch parameters
  • The data sources, when the report has access to the tables in another folder.

A chart for the development of reports using Crystal Report has been defined in the attached document.

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

Header

Presentation

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

Close

 

Fields

The following fields are present on this tab :

Code identifying the current record.

  • Title (field ZRPTDES)

Destined notably to figure in the reports and the screens in which the record code can be entered or selected. This text is used to give a clear description to the record concerned.

Close

 

Tab General

Presentation

Found here is the information linked to the global management of the report.

Close

 

Fields

The following fields are present on this tab :

General

  • Active (field ENAFLG)

This check box is used to activate or deactivate the current record without losing its content.

A deactivated record cannot be used (by calling its code) in other records (documents, setups, etc.) or during mass processings.

The authorizations for a given function can prohibit the creation of an active record. In this case, the box is cleared by default and it can only be modified by an authorized user or via a signature circuit defined by 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 title (field ZRPTSHO)

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

  • Module (field MODULE)

Module using the report.

  • Group (field GRP)

This is the print group associated with the report. Thanks to this information, it will be possible to launch the report from the print menu with the sub-menu RPTxx ( where xx is 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.

Group that have been given access rights in the user management.

Language

  • Multi-language (field MULLAN)

If this box is checked, it indicates that the report has been generated in all the languages managed in the folder, if not the report is unique in the language in which it was designed.

This field is used to reserve the report for a language ; language in which the report was designed.

Characteristics of departure

  • Type (field PRTNAT)

On the launch of the print, the destination is determined :

  • by the additional formula if it exists
  • if not, by the destination
  • or finally, if the first 2 elements are not entered, by the type.

The type serves to determine a destination in the case where the additional formula and the destination are not entered. On the launch of the print, the supervisor determines the destination by one of the four parameters associated with the type. Each value type corresponds to a parameter, in which a destination is entered :

  • Normal :       parameter PRT1
  • Fax :             parameter PRT2
  • Laser : Parameter PRT3
  • Color :      parameter PRT4

Note : The values in this local menu 22 are modifiable.

  • ZPL printer (field GESZPL)

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

  • Mandatory (field PRTOBL)

If this box is checked, it is not possible to modify the destination of the launch of the print of the report.

  • Linked prints (field IMPLIE)
  • Add info formula (field PRTFRM)

Entered or not, this field is used in the search for a destination by user and by report. This destination, if it is found, will have priority with respect to that specified above.

This field will be compared with the addition defined in the printer allocation function by user in the allocation algorithm for the printer at the time of printing,. Example : If in report X, an addition has been defined with the value "PAR" corresponding to printer Y and that he formula in report X contains the expression "PARAM(site)", then at the time of printing the report, if the "site" parameter is equal to PAR, the printer will be initialized to Y.

Scripts

  • Standard script (field TRTINI)

Processes in which it will be possible to write the additional sub-programs for the printing of this report. They are executed by the print expression just before the execution of the Crystal Reports report. It is used to initialize the variables defined in the report parameterization or possibly to prepare the files before the printing or even to update the fields in the database.

One process is reserved for the standard Adonix development and the other for the specific/custom. The update of a specific/custom process does not require protection with an activity code.  Development help

  • Specific script (field TRTSPE)

 

Accessibility

  • Not executable (field EXEFLG)

This field is used to indicate that the report is not directly executable from the print menu. This is the case for reports that are directly linked to a function and where the values of the print parameters come from the function.

  • Batch only (field EXEBAT)

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

 

Table 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 coherent with that entered in the Crystal Report report. There is the possibility to have reports of different orientation. 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)

Indicate if the access to this report can be controlled by site. If yes, it is necessary to indicate in relation to which function. It is possible to indicate a generic RPTxx function where xx represent the print group.

 

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

Close

 

Functions accessed by right click on the grid

Standard rerouting action
Standard rerouting action
Standard rerouting action
Standard rerouting action
Standard rerouting action
Standard rerouting action
Standard rerouting action

 

Fermer

 

Tab Parameter Definitions

Presentation

This grid is used to define the necessary parameters for the execution of a Crystal Reports report.

Close

 

Fields

The following fields are present on this tab :

Table Parameter definition

  • Parameter (field PARCOD)

This code will be used by Crystal Reports.

A selection window is used to propose a group of parameters that already exist in the reports. For this reason it is advisable to reuse the same parameter names.

Automation and standard for the parameters expressed with a start and end range : Only enter the start range. Its code must end 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 "end" or "fin". It does not appear in the grid but is passed to Crystal.

Automation and standard for the parameters expressed with a start and end range : Only enter the start range. Its code must end 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 "end" or "fin". It does not appear in the grid but is passed to Crystal.

  • Parameter title (field ZPARNAM)

Destined notably to figure in the reports and the screens in which the record code can be entered or selected. This text is used to give a clear description to the record concerned.

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 types previously defined. They usually make reference to an annex table (currency, dimension...). The F12 key allows you to obtain the 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.

Automation and standard for the parameters expressed with a start and end range : Only enter the start range. Its code must end 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 "end" or "fin". It does not appear in the grid but is 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)

This is used to enter the first element of the key for an object, if this object has a key made up of two components. Example : table number for a miscellaneous table.

Peculiarity of a dependent miscellaneous table : this field is used to enter the master element for the "master" miscellaneous table; in this case the miscellaneous table number is to be entered in the "menu" column.

  • Options (field PAROPT)

Can be entered if the data type is linked to an object. This field is used to define one or more filter options defined in the object. The supervisor controls the value entered in the parameter as a function of the filters set. Similarly, the selection window takes account of the filters.

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 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.

Then, for each of the data sources the tables used in the report must be specified. If a table is not referenced, it will automatically be associated with the data source form the current folder. Thus the tables in the current older are not reference here. The name of the table must be that used in Crystal Reports ; this can be a pseudonym, if it exists as this in Crystal Reports. A limit of 10 tables is to be respected here, a limit due to the print server. The name of a table is limited to 200 characters.

Close

 

Fields

The following fields are present on this tab :

Table Data sources

  • Title (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)

 

Table 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.

  • Title (field LIBTBL)

 

  • Number (field NUM)

number identifying one of the sources of the data in the grid shown above.

  • Data source (field LIBNUM)

Destined notably to figure in the reports and the screens in which the record code can be entered or selected. This text is used to give a clear description to the record concerned.

Close

 

Creation of a Crystal Report report

Follow the next steps :

  Create the Crystal report, using the Crystal Designer tool, on the client workstation, in the RptDev directory.

  Test the report using the Crystal Designer tool

  Create the dictionary record in X3

  Test the report from X3, by setting "report developer" mode using the Tools menu

  Transfer the report on the server, from the reports dictionary, in the "report name" field, by contextual menu.

Modification of a Crystal Report report

Follow the next steps :

  Transfer the report on the client, from the reports dictionary, in the "report name" field, by contextual menu.

  Modify and test the report using the Crystal Designer tool

  Test the report from X3, by setting "report developer" mode using the Tools menu

  Transfer the report on the server, from the reports dictionary, in the "report name" field, by contextual menu.

Reports

By default, the following reports are associated to the function :

 AREPORT : Report dictionary

This can be changed by a different setup.

Specific Buttons

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

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

Block number 1

  • field OBJET

 

  • field CLES

 

Block number 2

  • From folder (field DOSORG)

This field is used to define 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)

This field used to define 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 report dictionary to another folder.

Menu Bar

Documentation / Paragraphs

This function is used to access the documentation management on the first paragraph of the documentation (if there is one) associated to the current record.

Documentation / Links

This function is used to access the links management. It is used to define the links between the current and other records (for example the links between functions and setups). These links are specific to the documentation and are used to load the generation of documentation structures.

Documentation / Generation

This menu is used to launch a documentation generation. The generation can also be launched from the [Generation] button at the bottom of the window.

Three types of generation can be launched one by one or simultaneously:

  • the generation of the documentation structure from the dictionary (tables ADOCUMENT, ADOCBLB, ADOCCLB).
  • the generation of the documentation from the previous tables.
  • the generation of the field documentation.

The range suggested by default takes into account the current record but it can be modified upon launch.

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

An attempt has been made to delete a dictionary record for a report that is used in this function.

Deletion impossible / key used in object xxx

An attempt has been made to delete a dictionary record for a report that is used in this object.

Printer type incorrect

When a destination is specified whose issue is from a printer, the type entered in the screen must be coherent with that of the destination record.

Non-existent file

An attempt has been made to copy a Crystal Report report from the server to the client, but the report is not found on the server. This same control exists for the copy from the client to the server.

File exists, do you want to erase it?

An attempt has been made to copy a Crystal Report report from the server to the client, but the report already exists on the client. This same control exists for the copy from the client to the server.

Code already exists in line nnn

A parameter 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

Descriptive label

30

Short integer

4

Long integer

8

Characters

250

Date

4, 6 or 8 (Authorized length )

Decimal

32 ( for an integer part and decimal)

Local menu incorrect

A local menu associated with a parameter must not fall in the range 100 to 200.

Local menu not defined

The local menu associated with the parameter has not been defined as such.

Non-existent parameter

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

xxxx : link to the folder not defined

The folder/solution defined in the data source is not declared in the link tab of the current folder record.

Tables used

SEEREFERTTO Refer to documentation Implementation