Running and Generating Reports from Forms

The process of creating, running, and generating report outputs from Report type forms is different and more direct than with reports generated using third-party reporting tools.

Part of the reason for this is that, with Report type forms, the form itself is the report template. When you open the form, the system initially displays the template design, so you can see what is going to be pulled into the report.

Another part of the reason is that running the report itself takes place in runtime. When you open the form, you can click Run, and the system actually runs the report and displays the output exactly as it will appear when it is published.

Finally, the "parameters" for Report type forms are in the form of standard run-form phrases. This includes keywords such as SETVARVALUES, FILTER, and so forth. This is a departure from the positional comma-separated report parameter lists used by other report types in Mongoose.

So, if you are familiar with the way typical Mongoose forms run, you can easily understand how to take advantage of this form type.

Running a Report type form report

Running a Report type form report is as simple as launching the form. When the form opens, it displays first the Design page, which is the template for the report.

When you click Run, Mongoose generates the report and displays it in a series of pages that display the report data exactly as it will appear in the published output.

Publishing the report

After you launch the Report type form and run the report, you can publish the report output to a PDF file. To do this, click Export. Mongoose prompts you for a location and filename. After you provide them, Mongoose goes through this process:

  1. The form is cleaned in preparation for the report output generation.

    This includes the removal of any "report pages" (form pages displayed in runtime), other than the first page, which contains the actual template information.

  2. The WinStudio report engine creates the appropriate pages, one page at a time.

    For each page, WinStudio creates the appropriate header regions, processes the collection data for that page, and creates the footer regions.

  3. The BG "constant" variables are populated.

    This includes the common variables used to hold information such as the company name, company logo, page numbers, and so on.

  4. Page numbers and page number-related variables are calculated and populated as appropriate.
  5. WinStudio creates the PDF file with the name and in the location you specified.

Running the report as a background task

You can create a background task to generate and publish the report on a periodic basis. The process is the same as any other scheduled background task.

When a report is generated and published in this way, Mongoose creates a service session, impersonates the user who submitted the report request, runs the form, and publishes the output to a predetermined destination.

Rubriques liées