SIMPOL Documentation

graphicreport1

The most powerful report type in SIMPOL is encapsulated in the graphicreport1 family of types, which are found in the graphicreportlib.sml library. A fully banded report engine is contained in this set of types. The resulting output can be sent to either window or printer. The Graphic Report engine uses the printform1 functionality to create reports that can included multiple fonts, images, graphics, nested groups, and aggregate calculations. Specific information about working with the graphicreport1 package, can be found in the section called “Working with graphicreport1. Graphic Reports implement a banded report writer. What this means is that each section of the report is treated as a band of information, an the various bands are put together to create pages. There are bands for page header, page footer, report header, report footer, and for each defined group, group header and group footer, and for the body of the report. If a band is not defined, then it will not impact the output. For each band an area can be defined that is represented using a graphicreport1formpage, and is populated by graphicreport1form controls and graphics.

Table 22.8. graphicreport1 Types
TypeDescription
graphicreport1The key element of the graphic report system is this type. It is used to define and then run the report.
graphicreport1arcRepresents an arc that can be placed on the band of the report.
graphicreport1ellipseRepresents an ellipse that can be placed on the band of the report.
graphicreport1formThe physical representation of the report output definition is contained in this form.
graphicreport1formbitmapA bitmap element for a graphic report form.
graphicreport1formpageEach band of the report is represented by one of these pages, and the controls are placed on the page.
graphicreport1formtextThis is a text control that can be placed on the band of the report.
graphicreport1formlineRepresents a line that can be placed on the band of the report.
graphicreport1formrectangleRepresents a rectangle that can be placed on the band of the report.
graphicreport1formtriangleRepresents a triangle that can be placed on the band of the report.


The report1inst and report1groupinst types from the report1 type are also used in the event handlers for the graphicreport1 package and like with the Quick Report package, a graphicreport1 object is passed to the event handling functions. The list of exported functions can be found in the following table:

Table 22.9. graphicreport1 Functions
FunctionDescription
report1_graphicreport_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_graphicreport_output_groupheader()This function is called at the start of a group to output any defined group information, typically the name of the group and current GROUP value.
report1_graphicreport_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_graphicreport_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_graphicreport_outputpagefooter()Outputs the defined footer information, if any, at the bottom of each new output page.
report1_graphicreport_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_graphicreport_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.
loadgraphicreport()Loads a Quick Report from the XML storage format.
savegraphicreport()Saves a Quick Report in the XML storage format.


As with the Quick Report system, external programs will not likely make any use of the event handling functions, since it is designed to "just work". Instead, a user program should define the onoutput event of the graphicreport1formpage object.