Create Sum of Salaries Expression
In a similar fashion use the Expression Wizard to create a sum of salaries. This is a bit more involved than the COUNT function since the SUM function requires additional input. You will need to select the DataBlock field ‘salary’ as the parameter to be used in the SUM function, as summarized below (not all steps are shown since they are used in the expressions illustrated earlier).
- Start the Expression Wizard and type 'Sum of Employee salaries=' +. Be sure to include the single quotes for the text.
- Click Function to continue. Select SUM from the list of available functions. Selecting SUM will launch the following window:
- Click the ellipsis button
to launch the Expression Wizard for the SUM.
- Select Database field since the parameter for the SUM function is the employee salary and comes from the DataBlock.
- Select salary from the available fields and click OK.
- As was done with the COUNT function, check the “Reset after print” box to reset the sum to zero for each band.
- Also, check “Autosize width” to guarantee that enough room will be set aside for the new field to print.
- This item will be placed under the employee count field, thus you may need to increase the height of the band for the new field to fit. You may also select “Autostretch height” and the height of the band will be increased for you.
- Position the new fields just created by clicking each field then dragging it to the desired location within the band.