Creating a Standard Report
<< Click to Display Table of Contents >>
Creating a Standard Report
This topic covers the steps required to create a standard report.
Defining the Data Source
After you choose the File, New, Standard Report menu option, a ReportPro work window will appear along with a series of dialogs prompting you for information. The first dialog you will encounter is the Database Drivers dialog. This dialog allows you to specify the type of database you will be retrieving information from.
ReportPro provides native database drivers for FoxPro 2.5™, dBase 4™ and CA-Clipper™ file formats as well as a native driver for the Jasmine™ object database. Access to SQL data sources is provided via Open Database Connectivity (ODBC) technology.
Depending on the database driver you select here, you will be prompted for additional information that ReportPro needs in order to connect to and extract information from the database. The FoxPro driver will be used for this discussion. The Jasmine and SQL Data Source drivers require additional setup information and are covered in separate topics.
When you select the FoxPro, dBase or CA-Clipper driver, another dialog will appear prompting you to select a DBF file. The file you select here will be the primary table in the first section of your report. After locating the desired DBF file, click the Open button. If ReportPro cannot open the file using the driver you selected earlier, you will be asked to choose another driver.
After you have successfully opened the primary table, ReportPro will enter an idle state where it is waiting for you to build the report.
Adding Report Objects
The next step is to place report objects on the work window. Normally report objects are drawn on the work window. You start the process by selecting the desired drawing tool from the Tools, Drawing Tools menu or from the toolbar. After you have selected the appropriate drawing tool, left click the mouse in the work window, then move the mouse while continuing to hold the left mouse button down. You'll notice that the object is drawn as you move the mouse.
When you release the left mouse button, the object will be created. In some cases, you will be prompted for additional information. For example, if you are drawing a Field object, you will need to specify the Field object's expression once you have finished drawing the object. For a Text object, you will need to type in the text.
The objects you draw in the work window depend on the type and format of the report you are creating. If you are creating a simple listing report, you generally draw Text objects in the Page Header band to represent the report title and the column headings. In the Page Body band you place Field objects that extract information from the data source.
The figure below shows what a simple listing type report work window might look like.
For a form based report, you would reduce the size of the Page Header and Page Footer bands to zero and increase the Page Body band size to equal the size of the paper you are printing on. You would then proceed to mix Text and Field objects in the Page Body band to generate the proper form design.
As you draw the report objects, you may find ReportPro's Grid and Snap-to-Grid features handy. Both of these features are available from the Tools menu.
Customizing Your Report
After you have added the report objects, you will probably want to customize the report. ReportPro supports many options to allow you to tailor the report to meet your needs. You will probably want to modify the data source by defining a sort order or filter. These options are available on ReportPro's menu bar.
Next, you may wish to customize the report objects by adding shadows or borders. The object attributes are available on pop-up menus. You access an object's pop-up menu by right clicking the mouse over the object.
The report creation process is iterative. You do not have to create the report in the order discussed here. ReportPro's design interface is flexible enough to allow you to create the report in almost any sequence.