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).

  1. Start the Expression Wizard and type 'Sum of Employee salaries=' +. Be sure to include the single quotes for the text.
    Expression Wizard dialog box containing the text sum of employee sales equal sign plus sign.
  2. Click Function to continue. Select SUM from the list of available functions. Selecting SUM will launch the following window:
    Expression Wizard dialog for the SUM function.  In this dialog youenter the function argument.
  3. Click the ellipsis button Ellipses button to launch the Expression Wizard for the SUM.
    Expression Wizard dialog without any fields filled in.
  4. Select Database field since the parameter for the SUM function is the employee salary and comes from the DataBlock.
    Expression Wizard dialog with the salary field selected.
  5. Select salary from the available fields and click OK.
    Edit Expression field dialog containing the completed expression.
  6. As was done with the COUNT function, check the “Reset after print” box to reset the sum to zero for each band.
  7. Also, check “Autosize width” to guarantee that enough room will be set aside for the new field to print.
  8. 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.
  9. Position the new fields just created by clicking each field then dragging it to the desired location within the band.