Thursday, February 17, 2005
From the Edge: Creating a Simple Report the Hard Way
Section: Report Designer
Chapter: Running R:BASE Your Way!
Platform: R:BASE 7.x and V-8 "Turbo" for Windows
Build: 7.1.79.30214 and higher
This document will show you how to access the controls used by
Report Designer, working with a Report Designer, create and
configure the most common report controls.
Steps:
01. Start RBG7, connect to ConComp sample database
02. Database Explorer | Reports | New Report
03. Type the new Report Name as SimpleReport
Select Customer from the drop-down list of available Table/View Name
Type A Simple Report the Hard Way for the Description
Do not check the option for Use Report Wizard
Click on OK button (Figure 1)
04. Click on the OK button.
The report layout will be generated with the Report Header, Page
Header, Detail, Page Footer and Report Footer bands. (Figure 2)
05. Maximize the Report Designer window so that all controls are visible.
Take a little time to familiarize yourself with all controls by
category simply by moving the mouse over each control to read helpful
hints.
06. Remove the Report Header band (Figure 3)
. Report Designer | Main Menu | Report
. Un-Check the Report Header option. The Report Header band will be
removed from the report.
07. Remove the Report Footer band (Figure 3)
. Report Designer | Main Menu | Report
. Un-Check the Report Footer option. The Report Footer band will be
removed from the report.
08. Set the Paper Orientation (Figure 4)
. Select the File | Page Setup ... option from the Report Designer
main menu
. Click the Paper Size tab and change the paper orientation from
Portrait to Landscape, then click the OK button.
09. Lay Out the Customer List Title Label in the Page Header Band
. Right-click over the white space of the Page Header band and access
the Position... dialog.
. Set the height to 0.9167 and click the OK button. The Page Header
band should expand in height.
Note: You can also change the height of the Page Header band by
dragging the divider that appears below the white space of the Page
Header band. This method is quick and easy, but not as precise.
. Click the Label control (part of Standard Controls) icon on the
Report Designer controls palette.
. Click on the left side of the Page Header band. A label [Label1]
will be created in the Page Header band. It will become the current
selection.
. Locate the Edit box at the upper left corner of the Report Designer.
(Figure 5)
. Select the text inside it (Label1) and replace it with Customer List.
(Figure 6)
. Locate the Font control on the format bar.
Note: The font controls appear to the right of the Edit box and
provide the following functions:
. Font Name drop-down list
. Font Size drop-down list
. Bold
. Italic
. Underline Font Style
. Text Alignment
. Font color
. Highlight color
. Set the font:
Font Name Times New Roman
Font Size 12
Font Style Bold & Italic
. Locate the horizontal ruler. It is right above the Page Header band.
. Position the mouse over the ruler and right-click.
. Select the Millimeters option from the speed menu.
. Right-click over the label [Customer List] and select the Position...
menu option.
. Enter the following values into the Position dialog: (Figure 7)
Left 2.381
Top 1.323
Width 24.871
Height 5.027
. Click the OK button. The label should move to the upper left corner
of the Page Header band. (Figure 8)
Note: You can also change the position of a control by dragging it.
The exact position of the control will be displayed in the status bar
at the bottom of the Report Designer after it is dropped. You can use
any unit of measure (inches, screen pixels, millimeters, etc.) you
prefer.
10. Lay Out the Company Title Label in the Page Header Band
. Place another Label near the center of the Page Header band.
. Configure the label:
. Caption: Consolidated Computer Company
Font Name Times New Roman
Font Size 16
Font Style Bold & Italic
. Click the Font Color drop-down icon and select dark blue.
. Select View | Toolbars from the Report Designer main menu. A list
of toolbar menus should be displayed. Select the Align and Space
toolbar.
. Click on the label control that you just created in the Page Header
band.
. Click the Center Horizontally in Band icon on the Align or Space
toolbar. This should cause the label to be centered in the Page
Header band.
. Click on the Customer List label.
. Hold down the Shift key and click the "Consolidated Computer Company"
label.
. Click the Align Top icon of the Align or Space toolbar. The title
labels should now be aligned. (Figure 9)
11. Create Labels for the Page Header Band
. Place six labels in the Page Header band and position them from left
to right. Set the label captions as follows:
Company
Address
City
State
Zip Code
Phone
. Click on the Company label.
. Hold down the shift key and click on the Address label.
. Repeat this procedure until all six labels are selected.
. Set the font:
Font Name Times New Roman
Font Size 12
Font Style Bold
Font Color Black
. Leave these labels at their current positions, we will align them
later. (Figure 10)
12. Complete the Page Header band layout
. Click the Line control icon on the Report Designer's Standard
Controls toolbar palette.
. Click on the white space in Page Header band. A Line object will
be created.
. Right-click over the line and select the ParenWidth menu option.
The line will resize to the width of the page header band.
. Select the View | Toolbars menu option from the Report Desgner
main menu and make the Draw toolbar visible.
. Drag the Draw toolbar to the left side of the Report Designer
and dock it with the rest of the toolbars.
. Click the Line Thickness icon on the Draw toolbar and select 1 pt
thickness. The line thickness should adjust accordingly.
. Hold down the Ctrl key and press the down arrow key until the
line is positioned at the bottom of the header band. (Figure 11)
13. Lay Out the Detail Band
. Click the DB Text control icon (part of Database Controls toolbar)
on the Report Designer toolbar pallette.
. Click in the white space of Detail band. A DB Text object will be
created.
. Locate the two drop-down lists at the upper left corner of the
Report Designer toolbar. The drop-down list on the left displays
the assigned Table Name Customer. The list on the right side
contains a list of columns for the selected Customer table.
. Select the Company field from the Data Field list. A company name
should be displayed in the DB Text control object.
. Set the DB Text controls font:
Font Name Times New Roman
Font Size 10
Font Style Regular
Font Color Black
. Place five more DB Text control objects in the detail band. Assign
them to the following fields:
CustAddress
CustCity
CustState
CustZip
CustPhone
. Right-click over the horizontal ruler and change the unit of measure
to Screen Pixels.
. Right-click over the DB Text assigned to Company field and access
the Position... values:
Left 2
Right 4
. Access the Position... dialog of each remaining DB Text control
object and set the left position to the following values:
CustAddress 216
CustCity 424
CustState 578
CustZip 686
CustPhone 786
. Select the Company DB Text control, then Shift-click to select
the remaining DB Text controls
. Click on the Align Top icon of the Align or Space toolbar. The
control objects should align with Company DB Text control.
. Right-click over each of the controls and set Autosize to True.
. Right-click over the white space of the detail band and access
the Position... dialog.
. Set the height to 25. The detail band should shrink in height.
(Figure 12)
14. Align the Page Header Band Labels Vertically
. Select the Company label and right-click over it to access the
Position... dialog.
. Set the Top position to 65.
. Hold down the Shift key and select the remaining label controls
in the Page Header band:
Address
City
State
Zip Code
Phone
. Click the Top Align icon on the Align or Space toolbar. The
labels should align with the top of the Company label.
(Figure 13)
15. Align the Page Header Band Labels with the Detail Band DB Text
Controls
. Select the Company DB Text control object in the Detail band.
. Hold down the Shift key and click on the Company label control
in the Page Header band.
. Click the Align Left icon the Align or Space toolbar. The
label and DB Text controls should be aligned.
. Repeat this procedure for the remaining DB Text controls and
corresponding label controls. Make sure to select the DB Text
control in the Detail band first. The first control selected
determines the position used for alignment. (Figure 14)
16. Set Print Date Time
. Right-click over the white space of the Page Footer band and
access the Position... dialog.
. Set the height to 40. The footer band should shrink in height.
. Click the System Variable control (part of Variable Controls
toolbar) on the Report Designer toolbar pallette.
. Click on the far left side of the Page Footer band. A System
Variable control object will be created.
. Locate the drop-down list on the left-hand side of the Report
Designer. It should contain a list of variable types for the
control.
. Select the Print Date Time item from the list. The current
date and time will be displayed in the control.
. Set the font:
Font Name Times New Roman
Font Size 10
Font Style Regular
Font Color Black
. Right-click over the System Variable control object and access
the Position... dialog.
. Set the position values:
Left 9
Top 22
(Picture15)
17. Set Page Numbers
. Locate the horizontal scroll bar at the bottom of the Report
Designer
. Scroll right until the right edge of the Page Footer band is
visible
. Click the System Variable control icon (part of Variable
Controls toolbar) on the Report Designer toolbar pallette.
. Click on the far right side of the Page Footer band. A System
Variable control object will be created.
. Locate the drop-down list on the left-hand side of the Report
Designer. It should contain a list of variable types for the
control.
. Select the Page Set Desc variable type from the list.
Page 1 of 1 should be displayed in the control.
. Right-click over the System Variable control object and access
the Position... dialog.
. Set the position values:
Left 881
Top 22
. Right-justify the control by clicking on the Right Justify
icon the Format toolbar.
. Select the Print Date Time System Variable control object in
the Page Footer band.
. Hold down the Shift key and click on the Page Set Desc System
Variable control on the far right side of the Page Footer band.
. Click the Align Bottom icon the Align or Space toolbar. The
Page Set Desc System Variable control should be aligned with
Date Time System Variable control. (Figure 16)
18. Save the report.
. Click the Save (floppy disk) icon on the Report toolbar
pallette or Select File | Save option of Report Designer
main menu.
19. Preview the Report
. Click the Report Preview tab in the Report Designer. The report
will be displayed in the Print Preview from. (Figure 17)
. Click the Page Width and 100% buttons to view the report on a
larger scale.
. Type 80 in the % edit box and press enter.
. Type 120 in the % edit box and press enter again. The report
can be scaled for viewing at any size up to 250%.
. Click the Page Width button to continue viewing the report.
. Click the Next and Prior page buttons to navigate through the
pages of the report.
. Click the Print button to access the print dialog. From here
you can print All, Current, or a specified Range of pages.
Click the Cancel button to close the dialog.
20. Click on the Report Design tab.
21. Save the report and close Report Designer.
Note: Save your work frequently to avoid losing changes should
your computer unexpectedly lose power or crash.
A PDF version of this document with step-by-step instructions is
available at:
From The Edge: http://www.razzak.com/fte (Powered by R:WEB Suite)
Very Best R:egards,
Razzak.
P.S. This document is intended to help *new* R:BASE 7.1 users who have
recently joined the R:BASE World!