147
The ReportBuilder Enterprise Edition includes everything in ReportBuilder Standard, plus a full set of components necessary to deliver a complete end-user reporting solution. In the introduction to ReportBuilder, the reporting equation is described.
The reporting equation divides reporting into four main activities:
In ReportBuilder Enterprise, the goal is to deliver a full-fledged reporting solution to end users. This goal is achieved by delivering visual, easy-to-use solutions in each of these four areas. This screen shot of the ReportBuilder Enterprise Report Designer shows the ergonomic design of the user-interface.
Each of the four areas of reporting has a represen-tative notebook tab containing a visual environ-ment for the creation and configuration of components within that area. The results of each area become input for the next area: data feeds into calculations, calculations feed into components within the report layout, and the report layout is rendered into a preview of the report. The imple-mentation used by ReportBuilder Enterprise for each area of reporting is described below.
Data
Within the work environment of the Data tab, end users can quickly create dataviews, which can then be used to supply data to reports. Dataviews are usually created via the Query Wizard or Query Designer. Both of these tools are visual; they also allow the end user to select the tables, fields, search criteria, and sort order necessary for the report.
Behind the scenes, an SQL statement is generated and used to retrieve the data from the database. A screen shot of a completed dataview is shown below.
148
IntroductionREPORTBUILDER ENTERPRISE EDITION FUNDAMENTALS - MAIN The solution described on the previous page is the
standard behavior within the data workspace.
However, the developer can customize this user-interface by performing one of these three tasks:
• Register a replacement query wizard or query designer.
• Remove the query wizard or query designer.
• Create new dataview template classes that can simplify the data selection process even further by establishing the relationship between the tables in the database and presenting an alterna-tive user-interface (such as a single form that allows search/sort criteria to be entered).
The bottom line is that the Data area contains a turnkey solution that can be used out-of-the-box, but if customizations are needed, an architecture has been provided so that those customizations are possible.
Calc
This workspace contains a tree view of the report, all the bands within the report, and all the objects within each band. When a band or component is selected, all the events for that component are shown in a list. The user can then select an event and code the event handler in the syntax-sensitive code editor at the bottom. The following screen shot shows an OnPrint event as coded for a Line component.
This screen shot shows the Calc workspace in its most feature-rich and complex configuration.
Development work completed here can be passed on to end users so that they can modify it, locked down so that end users can only view it, or hidden completely so that end users do not know it is there. The most scaled-down version of the Calc tab is provided by a dialog-only interface, where no Calc tab exists at all, and a single syntax-sensi-tive code-editor dialog is accessible from the Cal-culations... menu option of the variable component.
Again, the user-interface and behind-the-scenes architecture has been made highly scalable in order to meet the various needs of developers.
149
Introduction REPORTBUILDER ENTERPRISE EDITION FUNDAMENTALS - MAIN
Design
The Design workspace contains the actual layout of the report. The user-interface is identical to the one presented to developers using ReportBuilder at Delphi design-time; in other words, it is full-fea-tured and professional. The Office style interface makes the Design workspace especially easy to learn for end users. A Report Wizard is available for creating reports quickly. You can customize this interface by replacing any of the dialogs it uses and by registering your own report wizards.
Preview
The Preview workspace contains the rendered report. The report can be printed to the printer or to various file formats from this workspace.
151
The Delphi Components REPORTBUILDER ENTERPRISE EDITION FUNDAMENTALS - MAIN
The Delphi Components
Overview
The following components appear on the RBuilder tab of the Delphi component palette when you install ReportBuilder Enterprise:
DBPipeline
Used for accessing data via TDataSet descendants.
The DBPipeline is connected via the DataSource property.
BDEPipeline
Provided for backward compatibility. Use DBPipe-line for all new development.
TextPipeline
Used to access comma, tab, and fixed-length record text files. Set the FileName property to specify the file. Double-click on the component to define the field structure.
JITPipeline
Used to access data stored in proprietary data struc-tures, arrays, objects, etc. Set the InitialIndex and RecordCount properties. Double-click the compo-nent to launch the Fields Editor and define fields.
Implement the OnGetFieldValue event to return the field value corresponding to the CurrentIndex and FieldName.
Report
The main component. Double-click to invoke the Report Designer. Assign the DataPipeline prop-erty so that the report can traverse data. Assign the DeviceType property to control where the output of the report is directed. Call Report.Print from Object Pascal to print the report or launch the Print Preview Form.
Viewer
This object is rarely used because you can replace ReportBuilder's built-in print preview form with your own customized version very easily (check the Building a Reporting Application tutorial). If you must use this component, an example is pro-vided in \RBuilder\Demos\Reports.
ArchiveReader
After you print a report to an archive file (.raf extension), you can read and preview the file via this component. Just assign the ArchiveFileName to the file and call the Print method. In terms of displaying a report, this component works the same as the Report component.
152
The Delphi ComponentsREPORTBUILDER ENTERPRISE EDITION FUNDAMENTALS - MAIN
DataDictionary
Used by the QueryWizard component to convert raw table and field names into more usable aliases.
This component is generally used only when you are creating an end-user reporting solution.
Designer
Used when you want to deploy the Report Designer to your end users. See the End-User demo (Demos\EndUser directory).
ReportExplorer
Used to provide a Windows Explorer-style inter-face to End-User Reporting solutions developed using ReportBuilder Enterprise. See the End-User demo (Demos\EndUser\1 Report Explorer\ direc-tory).