PARTS ReportWriter Extensions


Description

PARTSRecordSource: A framework for specific record sources

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.
 

Files

GoitPartsReportWriterX.sll
GoitPartsReportWriterX.sml
Extensions library and source for the PARTS ReportWriter 
GoitPrwxTester.par Sample report application.

Requirements

VS/VSE 3.1.3 for Win32s and PARTS.

Installation

Copy the GoitPartsReportWriterX files to the VS/VSE library directory or a directory that appears in the Windows PATH statement. Ensure PARTS is already installed.

Example

An PARTS application, GoitPrwxTester.par, is included that demonstrates the PARTSRecordSource and PARTSTitleFramePart.  Open and launch the application in the PARTS workbench.  When the demo application starts, the user is prompted to specify a class from which a hierarchy is to be reported.  The application sets the object stream of PARTSRecordSource to all subclasses of the class entered. See the Initialize scripts of  the parts named TheRecordSource and Constants for additional info. Upon each class from the PARTSRecordSource object stream, a subclass group is introduced with the PARTSTitleFramePart. For each class, the name and instance size is reported. The report displays the total number of classes reported at its conclusion.

Additional info

Future planned features: Any comment is appreciated.

Contact

Lars Niedermeier
ln@goit.de

Links to:
The ObjectShare web site
VisualSmalltalk Product Support
ObjectShare's Online Documentation Site