Adding a filename prefix parameter to a report

When you create a report that runs as a background task, you can add a parameter to the event handler for the background task, that designates a prefix for the filename of the output. This can make it easier to search for and locate the report file later. This procedure is particularly helpful when working in a Multi-Tenant Cloud (MTC) environment.

By default, TaskMan assigns the name (not caption) of the report form as the filename prefix. The procedure in this topic allows you to use your own custom prefix in place of the report name. This procedure is best used to define a prefix that does not change whenever the report is run.

Note: Alternatively, you can use an application event system (AES) event handler to assign a filename prefix to the report file on a dynamic basis. For that procedure, see Assigning a report filename prefix using the AES.
  1. Open the report's form in the Web Designer (web client) or Design Mode (Windows client).
  2. From the Edit menu, select Event Handlers.
  3. In the Event Handlers dialog box, locate and select the GenerateReport event handler, which has a Response Type of Run Background.
  4. Click Edit.
  5. In the Response section of the Event Handler Properties dialog box, select Parameters.
  6. Click the ellipses (•••) button.
  7. In the Event Handler Parameters dialog box, click Type Specific Parameters.
  8. In the Edit Background Task Name and Parms dialog box, in the Profile Parms field, enter the string to use as the filename prefix for the report outputs.
    Make sure to enclose the prefix string in double quotation marks (" ").
    Note: This parameter must be the ninth parameter listed in this field. This means that, if the Profile Parms field does not already contain eight parameters, you must add enough commas to make your prefix string the ninth parameter.
  9. Click OK, OK, OK, and Done.
  10. Exit the Web Designer (or Design Mode).
The system applies the new filename prefix to the report output files.

You can verify that this procedure was successful by running the report and then checking the filename of the resultant report output file.