ActiveReports 6 Online Help
Create Calculated Fields

ActiveReports allows you to add calculated fields to a report using the Report Explorer, or you can use the DataField property of any textbox to perform calculations based on the value of specific data fields. This how-to topic multiplies the values of two bound fields, but you can use any valid Field Expression operators. See the Add Field Expressions topic for more information.

To create a calculated field

  1. In the Report Explorer, expand the Fields node, right-click on the Calculated node, and select Add. This creates an unbound field named "field1" that can be used to perform custom calculations.
  2. With field1 selected in the Properties Window, change the Formula property to =Quantity * UnitPrice to bind it to the product of the Quantity and UnitPrice fields, substituting the names of fields that you have under the Bound node in your report.
  3. Change other properties as desired.
  4. Drag the field from the Calculated node onto the detail section of the report. This creates an ActiveReports TextBox object, and sets its DataField property to the name of the calculated field.
See Also