Using Report Writers

 <  Day Day Up  >  

Report writers are development tools you can use to generate professional reports from multiple data sources. You can consider a report writer as a specialized type of 4GL. Like 4GLs, they raise the level of abstraction by using fewer statements to produce reports than 3GLs do. They differ from true 4GLs in that they commonly are designed for one purpose: the generation of formatted reports.

For example, a report writer can often generate a report with a single command, whereas a 3GL must read data, format the data, program control breaks, format headers and footers, and then write the report record. IBM's Query Management Facility (QMF) and Computer Associates' Report Facility are examples of mainframe-based report writers for DB2.

PC-based report writers also are quite popular. They require a gateway setup as discussed earlier. Examples of this type of tool include Seagate's Crystal Reports, Business Objects, and Cognos Powerplay; IBM also offers a version of QMF for Windows.

Report Writer Application Guidelines

When using report writers to build DB2 applications be sure to consider the following guidelines.

Follow Previous Guidelines

The rules for fourth-generation languages also apply to report writers. Refer to the "4GL Application Guidelines" presented previously in this chapter.

Likewise, many popular report writers work in a client/server environment instead of completely on the mainframe. For example, the user interface runs on a workstation but accesses data from DB2 tables on the mainframe. When you're using a report writer in a client/server environment, refer to the "Client/Server Guidelines" presented previously in this chapter for guidance.

Learn the Report Writer Capabilities

Use the capabilities of the report writer to format your output. Most report writers have formatting codes to guide how each column is to be displayed on the final report. For example, if you are using a report writer that supports displaying numeric data with leading zeroes, use that capability instead of storing the numeric data in a character column and forcing the leading zeroes to be stored.

 <  Day Day Up  >  


DB2 Developers Guide
DB2 Developers Guide (5th Edition)
ISBN: 0672326132
EAN: 2147483647
Year: 2004
Pages: 388

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net