How to Use the Report Designer - An Overview

Top  Previous  Next

Use the Report Designer to visually design report elements--headers, totals, detail lines, graphic images, preprinted forms, etc.--on screen. The Report Designer automatically generates the Clarion language source code that defines these elements.

The Report Designer has six major components that help design your report: the Sample Report with Rulers and Grid Snap, the Controls Toolbox, the Data/Tables Pad, the Property Toolbox, the Align Toolbox, and report Preview.

Using the Report Designer - A Typical Procedure

The Report Designer represents the four basic parts of the REPORT data structure by showing the page HEADER, DETAIL, FOOTER, and FORM as four "bands."

Here is the typical process for developing a report with the Report Designer:

1.

Specify the files and sort keys your report procedure will use.

2.

Establish the general layout of your report: paper size, page orientation, page margins, and band positions.

3.

Place constants such as report titles and logos in the header band or the form band.

4.

Place variables such as page numbers and section headers in the header band.

5.

Place data dictionary fields from your data files in the detail band.

6.

Set a group break or breaks, with variable headers, subtotals, etc.

7.

Preview! your report.

8.

Repeat any of the above steps as necessary, to fine tune your report.

9.

Exit! the Report Designer.

 

Using the Report Designer - Page Layout

1.

Choose Report Designer Page Layout View.

2.

Reposition the report bands by dragging their handles.

Bands may overlap, abut, or be separated by space.

You can also use the Properties Pad drop list to quickly select a target report band for resizing.

How to Set Report Margins

The default margins for the detail print area are one inch from the left edge of the page, and two inches from the top. This setting leaves space for a HEADER at the top of the page. You specify the margins in the Position property of the respective Report, Page/Group Header, Detail, and Page/Group Footer property bands in the Properties Pad.

·

To specify the left margin, enter a value in the X property box.

·

To specify the top margin, enter a value in the Y property box.

·

To specify the height, enter a value in the Height property box.

·

To specify the width, enter a value in the Width property box.

These values set the AT attribute for the selected report structure.

The AT attribute on report structures performs two different functions, depending upon the structure on which it is placed.

When placed on a FORM, or page HEADER or FOOTER the AT attribute defines the position and size on the page at which the structure is printed. The position specified by the x and y parameters is relative to the top left corner of the page.

When placed on a DETAIL, or group HEADER or FOOTER the print structure is printed according to the following rules (unless the ABSOLUTE attribute is also present):

·

The width and height parameters of the AT attribute specify the minimum print size of the structure.

·

The structure is actually printed at the next available position within the detail print area (specified by the REPORT´s AT attribute).

·

The position specified by the x and y parameters of the structure's AT attribute is an offset from the next available print position within the detail print area.

·

The first print structure on the page is printed at the top left corner of the detail print area (at the offset specified by its AT attribute).

·

Next and subsequent print structures are printed relative to the ending position of the previous print structure:

If there is room to print the next structure beside the previous structure, it is printed there.

If not, it is printed below the previous.

The values contained in the AT attribute's x, y, width, and height parameters default to dialog units unless the THOUS, MM, or POINTS attribute is also present. Dialog units are defined as one-quarter the average character width by one-eighth the average character height. The size of a dialog unit is dependent upon the size of the default font for the report. This measurement is based on the font specified in the FONT attribute of the report, or the printer's default font.

 

Using the Report Designer - Paper Size

1.

Choose View Properties.

Select the Report control from the Properties Pad drop list

2.

Select the Paper > Type property.

3.

Standard Sizes: choose from forty-one sizes in the Paper Size drop down list.

The list includes standard letter, legal, ledger, envelopes, and more.

4.

Custom Sizes: choose Other from the Paper Size drop down list, then type your own width and height values.

5.

Set the Landscape property to TRUE to orient the report text parallel with the longest edges of the paper.

 

Using the Report Designer - Constant Strings

1.

Pick the STRING control from the Controls toolbox, and drag to one of the report bands.

2.

CLICK on the string control you just placed, and press the F4 key to open and switch focus to the control’s properties pad.

3.

Type the constant text you need in the Text property field.

4.

Resize the control so that it's wide enough to hold the text, by DRAGGING its right handle.

 

Using the Report Designer - Variable Strings

Use variable strings to display data dictionary fields, Clarion total fields, such as Page No., Sum, Average, Count, etc., and your own calculated fields.

1.

Pick the STRING control from the Controls toolbox, and drag to one of the report bands.

2.

CLICK on the string control you just placed, and press the F4 key to open and switch focus to the control’s properties pad.

3.

Set the VariableString property to TRUE.

4.

Type a picture token in the Text property.

For example, @n2 specifies a numeric picture for the control. @S10 specifies an alpha-numeric picture for the control.

5.

For data dictionary fields or memory variables, press the Use property ellipsis (...) button to choose a field (or define a new field) from the Select Column dialog.

6.

For Clarion total fields, simply choose a total type from the TotalType property drop down list.

 

Using the Report Designer - Graphic Images

1.

Pick the IMAGE control from the Controls toolbox, and drag to one of the report bands.

2.

Resize the image control by DRAGGING its handles.

3.

CLICK on the image control you just placed, and press the F4 key to open and switch focus to the control’s properties pad.

4.

Press the File property ellipsis (...) button to choose a graphic file from the Select Image File dialog.

Choose bitmaps (.BMP), metafiles (.WMF), icons (.ICO), jpeg (.JPG), etc.