STEM help

8.6.2 Configuration of offline report location and online download folder

In order to enable this functionality for a model called MyModel and a template file called MyTemplate.xlsx stored in the /offline/Models/MyModel/ folder, then you would need to set the following settings in the export dialog of the Editor or Results Program:

Report template The relative path and filename of the report file (relative to /offline/models/MyModel/).
Friendly name A name to display to web interface users for this report. In the current user interface, you must specify this option within the Report template setting box, separating it from the template filename with a single tab character. If you do not provide a value for this setting then the report’s filename will be displayed.
Report type The type of report to make available – may be XLSX, PDF or BOTH. In the current user interface, you must specify this option within the Report template setting box, separating it from the friendly name with a single tab character. If you do not provide a value for this setting then it will default to PDF.
Cell tag The text to look for in cells of the template that indicates the cell contains template commands to be processed.
Download location The path relative to /online/ at which the reports generated for this model should be placed.

Report generation settings

After export, these settings will appear in the WebServiceModelConfig.txt file and may be verified here (although any manual changes would be lost upon the next export from STEM):

The actual download file will be located at Models\MyModel\download\~<random-id>\ and the filename used will be the same as the report template (each generated report ends up in a different randomly named folder, so there can be no collision with older reports).

You may optionally add a timestamp to the generated filename, in which case it would become MyTemplate-20120531-1700.xlsx (i.e., appending the current date and time in UTC). There is no user interface to set this at present, but it may be set by editing the WebServiceModelConfig.txt file to include the following line:

You can generate multiple reports for your model by specifying multiple report templates in the export dialogs. Place each template’s filename, friendly name and report type on a separate line in the provided text box. When a user exports reports from the default web UI they will be presented with all of the configured reports, but the web service includes options to export only a subset of these for custom web UI code.

 

© Implied Logic Limited