Skip to content

Creating a Report

Managing reports is facilitated through the utilization of a RecordM definition. To initiate the creation of a new report, simply access the Reports definition and click on the 'New Record' button.

A Report is composed by 4 blocks:

report-instance_1


Report Identification

Fundamental information about the report includes its name, a brief description of its intended purpose, and the specified report template to be used during generation.

report-instance-id-block


For more information on how to create a report template please refer to Excel Template Configuration.

Report Visibility

The list of groups that will have access to this report. The restriction with the help of lelve4 permissions and is made with the cross reference between the user groups and list of groups defined here.

report-instance-visibility-block


reportm-userm-groups_1


Report Execution

Observing the images above, you'll notice that a report comprises numerous input fields, assisting in defining a new report and determining its generation parameters. ReportM currently accommodates three execution triggers for generating reports:

Manual Trigger

This trigger will introduce a new menu in the search definition, allowing you to generate the report optionally against selected records.

TIP

Any selected rows will be passed to the report via the variable query.

report-instance-execution-manual-block_1


reports-def-tickets-instance


Extra arguments for the report

You can also extend the report generation form by providing additional arguments that will be passed into the report. For more information about report arguments, see Report COB_ ARGS.

report-instance-execution-manual-block_args


report-execution-manual-args-form_1


During report generation, the values entered in these fields will be passed to the report service as a cob arg value, allowing you to use them in the report.

Event Trigger

This trigger generates the report based on an event. It evaluates the Groovy expression specified in the condition field, and if it proves to be true, the report will be generated.

TIP

For more information on how to write groovy conditions please refer to ...

groovy
msg.field("State").changedTo("Done")

report-instance-execution-event-block


Scheduled Trigger

This trigger automates report generation on a scheduled basis. The only requirement is to define the frequency at which the report should be generated.

report-instance-execution-scheduled-block_1


Report On Done Actions

After generating a report, the user has the flexibility to determine subsequent actions. At the moment, the supported actions are:

Send the report to a list of recipients

The email configuration is quite straightforward, resembling a typical email setup. Here, you'll specify the recipient(s) of the email, the subject, and the body content.

Additionally, support for placeholders is available. This enhanced functionality is made possible with the assistance of Handlebars, enabling more powerful emails where the data provided to the Handlebars context can be extracted from the report itself. Initially, variables are defined along with their corresponding cell references (e.g., sheet!A1), which can then be referenced within the Handlebars template.

Cell ranges

If you prefix the cell reference with the last row number, such as sheet!A1:10, you can define a range. In this scenario, you'll have access to all non-empty values of column A across rows 1 through 10.

report-instance-ondone-email-block

Default variables available in Handlebar context:

VariableDescription
REPORT_NAMEthe report name
REPORT_DESCRIPTIONthe report description
REPORT_SOURCE_INSTANCE_IDthe instance id that triggered the report generation. Only applicable to reports that are triggered from an event

Handlerbar helpers:

HelperDescriptioninput typearguments
emailsconcatenate a list of values separated by ';'ListList
joinconcatenate a list of values separated by the provided symbolListchar (default to ',')
iteratesplit the string value using the provided char and iteratesStringchar (default to ',')
isEqualcompare two values and return TRUE if equalany
isNotEqualcompare two values and return TRUE if not equalany

Attaching the report to the instance

In this case, you will need to indicate the name of the field to which you want to attach the file.

report-instance-ondone-attach-block

WARNING

Attaching a file to the source instance of the event is only possible if the trigger of the report is of type EVENT