Follow these steps to create a new calculated field for your report:
Click the Reports button on the toolbar. In the Report Writer window, select and open a report definition. Click Layout in the Report Definition window. The Report Layout and Toolbox window will open. From the Layout tab in the Toolbox window select Calculated Fields from the drop-down list, then click New.
The calculated field name can be up to 79 characters long.
This is the storage type that will be used for the value the calculated field produces. For example, if the calculated field is a calculated expression that concatenates two string fields, the result type must be a string.
If the calculated field is based upon a conditional expression, both the True Case and False Case values must be of the same storage type as the result type.
Calculated is selected by default. If you select Conditional, nine additional boolean operators will be enabled in the Operators section; the True Case and False Case fields will also be enabled.
Select each element to be included in the expression from the appropriate tab (Fields, Constants, or Functions). Click Add to place the selected element in the currently-highlighted position within the expression. Add the appropriate operators to the expression as needed.
If this calculated field is based on a conditional expression, define the True Case and False Case values. One of these values will be printed in the calculated field on the report, depending on whether the expression defined is true or false.
Click OK to save the calculated field and return to the Report Layout window.