PARTS Reports can process record sources implementing a specific set of methods (do: and at:ifAbsent:). In real applications a more sophisticated abstraction layer for specific record sources is needed.
The class PARTSRecordSource implements generic streaming over objects. During the streaming, every object is wrapped into a PARTSReportRecordWrapper that maps at:ifAbsent: to the appropriate selector.
Database queries via ODBC are implemented using a PARTSOdbcRecordSource. This specialization of a PARTSRecordSource iterates over an ODBC result. PARTSOdbcReportRecordWrapper again wraps each data record referencing the unique column description.
PARTSTitleFrames: Record groups can be introduced by their according title
PARTSTitleFramePart is implemented as a subclass of PARTSGroupFramePart. It enables the user to introduce a record grouping with a title generated every time a new group starts. The group column may be omitted in the record frame to save space and improve the layout.
Usage: How to use constants in reports
The sample also demonstrates how to use constants in report structure
parts like the page header.
| GoitPartsReportWriterX.sll
GoitPartsReportWriterX.sml |
Extensions library and source for the PARTS ReportWriter |
| GoitPrwxTester.par | Sample report application. |
Links to:
The
ObjectShare web site
VisualSmalltalk
Product Support
ObjectShare's
Online Documentation Site