SIMPOL Documentation

quickreport1

A much easier to use reporting type in SIMPOL is the quickreport1 type, which is found in the quickreportlib.sml library. This provides a wrapper around the report1 type that delivers output to window, printer, clipboard, HTML, CSV, and database (SBME format). Specific information about working with the quickreport1 package, can be found in the section called “Working with quickreport1.

Table 22.6. quickreport1 Types
TypeDescription
quickreport1The key element of the quick report system is this type. It is used to define and then run the report.
quickreport1columninfoFor each column an element of this type is required to define the column characteristics, including: the starting horizontal position and the width, both in micrometers, the alignment, and whether the column content should wrap onto the next line.
quickreport1datasourceThis is the return value from the call to add a data source to the Quick Report. The return value is passed to the code that adds a table, but is otherwise not generally used externally.
quickreport1tableThe wrapper for the database table containing a link to the data source and thereby all information required to reopen the table at another time. This is primarily used internally, though it is the return value from adding a table.


The instance types from the report1 type are also used in the event handlers for the quickreport1. In addition they also receive the quickreport1 object. There are a number of functions associated with the running of a Quick Report, which are listed below:

Table 22.7. quickreport1 Functions
FunctionDescription
report1_quickreport_output_groupfooter()This function is called at the end of a group to output any defined group information, typically the count and/or an aggregate value.
report1_quickreport_output_reportfooter()This function is called at the end of the report to output any defined report information, typically the count and/or an aggregate value.
report1_quickreport_output_reportheader()This function is called at the start of the report to output any report specific information. In practice this function is used to open output files or output file header information.
report1_quickreport_outputpageheader()Outputs the defined header information, if any, at the start of each new output page. It is only called once for some output formats.
report1_quickreport_outputrowThis function is called once for each row of output. It also is responsible for determining if a group has ended, or the end of the page has been reached.
loadquickreport()Loads a Quick Report from the XML storage format.
savequickreport()Saves a Quick Report in the XML storage format.
convert_dpi_mcm()Converts a measurement from pixels to micrometers at the current dot per inch value of the display.
convert_mcm_dpi()Converts a measurement from micrometers to pixels at the current dot per inch value of the display.


In general, no use is made of the above-named functions by user programs, since the beauty of the Quick Report is its simplicity. Once the report has been set up, it just needs to be run. It also has various options such as displaying a progress gauge that can be enabled or not as desired. The simplicity is an advantage but also the only real drawback of this report. For much more freedom in the design of a report, it is necessary to use the Graphic Report.