Skip to main content

Custom Calculation

Insert a custom calculation into your report to display dynamic values based on formulas or expressions that you define.

When to use custom calculation

  • Displaying calculated metrics: Show calculated values such as percentages, sums, or ratios alongside your report data.
  • Highlighting key results: Display important computed values directly in your report for quick reference.

Add a custom calculation

  1. In the Toolbar panel on the right, select Edit Report.
  2. Select the Report Widgets icon.
  3. Drag the Custom Calculation control onto the report. A yellow highlight appears to show possible placement areas. The Custom Calculation panel appears at the same time.
  4. Complete the necessary fields for your calculation.
  5. Select the Design tab and expand Report Section Properties.
  6. Adjust the Properties, Font, and Border as needed.
  7. Click Exit Edit Mode when finished.

Design properties

Properties

PropertyDescription
DescriptionEnter a label that describes the calculation’s purpose.
HeightSet the height of the control in pixels.
Background ColorSelect a background color for the control. Use the color picker and select Apply, or enter a HEX code manually.
Top MarginAdjust spacing between the control and elements above it.

Font

PropertyDescription
FontChoose a font family for the calculation text.
SizeSet the font size.
Font ColorSelect a color for the calculation text. Use the color picker and select Apply, or enter a HEX code manually.
StyleApply font styles such as italic, bold, or underline.

Border

PropertyDescription
Vertical BorderShow or hide vertical borders for the control.
Horizontal BorderShow or hide horizontal borders for the control.
Vertical ThicknessSet the thickness of the vertical border.
Horizontal ThicknessSet the thickness of the horizontal border.
Border ColorSelect the color for the borders. Use the color picker and select Apply, or enter a HEX code manually.

Edit the fields

Change the format

  1. Select the Data tab and expand Data Configuration.
  2. Click the pencil icon next to Edit Fields to open the dialog.
  3. In the Fields column, select the field you want to format.
  4. Expand the Format section.
  5. Choose your format options, such as data type, category, and formatting options.
  6. Select Validate to check your changes, then select Save.

Build a custom formula

  1. Select the Data tab and expand Data Configuration.
  2. Click the pencil icon next to Edit Fields to open the dialog.
  3. In the Fields column, select the field you want to edit.
  4. Expand the Script section.
  5. In the left column, select a field to display its available values in the Field Name box.
  6. Double-click any value or field in the Field Name box to insert it into your formula.
  7. Use the operator buttons to add mathematical or logical operators to your formula.
    Every formula must start with result= and end with a semicolon (;).
  8. Select Validate to check your script, then select Save when finished.

Edit Fields options

Format

  • Data Type: Specifies the kind of value in the field.
  • Alignment: Sets the text alignment within the field.
  • Category: Determines the data display style, with options depending on the data type.
  • Options: Additional controls that refine your chosen category.
Data TypeCategoryOption
CharText fields used for names, codes, or descriptions.
  • None – Displays plain text.
  • Text-Rtf – Supports rich text formatting, including bold, italic, and lists.
N/A
NumericDecimal fields used for quantities, financial values, or measurements.
  • None – No specific formatting.
  • Number – Displays as a general numeric value.
  • Currency – Displays as a currency with a symbol.
  • Percentage – Displays as a percent value, multiplied by 100.
  • Symbol
  • Decimal Places
  • Zeros Leading
  • Negative Format
IntegerWhole number fields used for counts or identifiers.
  • None – No formatting applied.
  • Number – Displays as a general numeric value.
  • Currency – Displays as a currency with a symbol.
  • Percentage – Displays as a percent value, multiplied by 100.
  • Symbol
  • Decimal Places
  • Zeros Leading
  • Negative Format
DateCalendar date fields.
  • None – Displays plain text.
  • Date&Time – Formats as a date, time, or both.
  • Date
  • Time
  • Century
TimeTime fields representing hours, minutes, or seconds.
  • None – Displays plain text.
  • Date&Time – Formats as a date, time, or both.
  • Date
  • Time
  • Century
DateTimeFields that store combined date and time values.
  • None – Displays plain text.
  • Date&Time – Formats as a date, time, or both.
  • Date
  • Time
  • Century

Script

ElementDescription
Left columnLists all available fields and calculations.
Field NameDisplays field names or values related to your selection.
Script areaProvides a place where you compose your formula. All scripts must begin with result= and end with a semicolon (;).
Operator buttonsAdds operators (=, +, -, *, /, ;) to the formula.