Workflow rules > Category > Code APRINT ([Etat en pièce jointe]) 

This Workflow is triggered when a report is printed to be sent by the e-mail software. This is possible only if the ASAIDEST parameter is set to No (otherwise, the message is sent by Crystal Reports).

Context and operating mode

This workflow rule is triggered on the miscellaneous event named "Attached report".

It triggers a message.

The process is as follows:

  • The report is created in a file (and the GFILPATH variable is used to identify its path). It should be noted that if a segmentation parameter has been assigned, several records can be created (50 at the most). In that case, GFILPATH contains a regular expression that defines the name of the path (of root* type, where root represents the beginning of the filenames concerned).
  • The fact that GFILPATH is specified in the rule makes it possible to join the files, which path can be identified by the PCEJOI(1..50) variables. Using the GOBJTXT.SETFIC function is used to keep only the definitive filename in the path.
  • The different DIV type rules associated with the ARP event code (such as this one, proposed by default) are launched. At this stage, it is possible to launch the report and test the report its code and parameters, because the parameters entry screen is online. It is also possible to use global variables which would have been updated when launching the report.

Triggering criteria

The additional triggering criteria are the following :

Recipients

The recipient definition is performed as follows :

The default rule send the report to the current user, but, of course, it can be modified. Usually, the recipients are assigned according to the context of the report launch. As this context depends on the report itself, it frequently happens that several rules of this type will test, for each one of them, the [F:ARP]RPTCOD report code.

Tables used

No table is used by this function.