Progress
Report Builder
Tutorial
Creating the Address–All Calculated Field
To display a customer’s complete address using the data in the Address, Address2, City, State, and Postal–Code fields, you can either use each individual field or create a calculated field that incorporates all five fields. The typical address format contains multiple lines with several address components on each line. If you simply insert the fields on the layout, Report Builder places them in individual columns. To properly format the fields, you would have to create individual text fields to insert the necessary spaces and punctuation, then apply the merge left option to all the fields. However, you can create a calculated field that adds the appropriate punctuation and spacing.
Follow these steps to create the Address–All calculated field:
- Choose Calculations
Calculated Field. The Calculated Fields dialog box appears:
![]()
It lists the default calculated fields that Report Builder created with the Instant Layout option.
- Choose the New button. The New Calculation dialog box appears:
![]()
- Type Address–All in the Calculated Field Name field.
- Type the following expression in the Expression field:
Address + ” ” + Address2 + ”, ” + City + ”, ” + State + ” ” + Postal–Code
This expression joins each of the database fields and text strings together into a single field. Each set of quotation marks includes a blank space. For the quotation marks that also include a comma, enter the blank space after the comma. Also, be sure to enter a space between each field, text string, and operator.
There are several ways to create this expression:
- Type each field name, text, and operator.
- Select the fields from the Fields selection list, then choose Insert or double-click on the fields.
- Activate the Operator Palette toggle box, then choose the appropriate operator.
See the Progress Report Builder User’s Guide for a complete explanation of calculated field expressions and operators.
The following figure shows the New Calculation dialog box with the correct expression in the Expression field and the Operator Palette displayed:
![]()
- Choose Verify to check the expression syntax. If there is an error in the expression (for example, if you did not leave a blank space between one of the expression elements), Report Builder displays an error message. When possible, it also positions the cursor to the place in the expression where the error occurred.
Edit the existing expression if it is not correct.
- Choose OK to create the field and return to the Calculated Fields dialog box:
![]()
- Choose Close to return to the report layout.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |