Skip to main content

Parameters and Calculated Fields

Parameters and calculated fields are the two mechanisms for introducing dynamic values into a Report Forge output. Parameters expose runtime-selectable values (e.g., reporting period, project reference) that the consumer or the template engine provides. Calculated fields derive new values from existing fields using expressions, removing the need to pre-compute values in the source data.

Report Forge parameters and calculated fields

Parameters

Parameter types

TypeDescriptionExample use
TextA free-text string value.Package reference, document prefix, contractor name.
NumberA numeric value.Threshold value, target cost, N for Top-N limits.
DateA calendar date.Reporting period end date, data date, cut-off date.
Select (single)One option from a predefined list.Reporting period (Jan/Feb/Mar...), phase, status.
Multi-selectMultiple options from a predefined list.Disciplines, contractors, zones, statuses.

Creating a parameter

  1. In the Data tab, click Parameters.
  2. Click + New parameter.
  3. Set the Name (used in expressions and filter bindings as {ParameterName}).
  4. Set the Type (text, number, date, select, multi-select).
  5. For Select and Multi-select types, define the list of allowed values (static list or a field from a data section).
  6. Set a Default value that is used when the report is previewed without a consumer-provided value.
  7. Optionally set Required to force the consumer to provide a value before the report renders.

Referencing parameters in filters

In the Filters panel, when entering a filter value, type {ParameterName} to reference a parameter. The filter will use the parameter's current value at render time.

Referencing parameters in text

In text boxes and component titles, use {{param.ParameterName}} to insert the parameter value as text. Example: a page title reading Schedule Report — {{param.ReportPeriod}}.

Cascading parameters

To make one parameter's available options depend on the selection in another:

  1. In the parameter's value list definition, select Dynamic list from section.
  2. Set the source section and the field to use as options.
  3. Add a Filter on the source section referencing the parent parameter: e.g., the Discipline parameter list is filtered to disciplines present in the selected Phase.

Calculated fields

What a calculated field is

A calculated field is a named expression evaluated per row (before aggregation) or as a scalar across the section (post-aggregation, as a measure). Calculated fields appear in the Fields panel with an fx badge and can be bound in component wells exactly like native fields.

Creating a calculated field

  1. In the Fields panel, click + Calculated field at the bottom of the section.
  2. Enter a Name for the field.
  3. Select the Scope: Row-level (evaluated per record) or Measure (evaluated after aggregation across the filtered rows).
  4. Enter the Expression using the expression editor.
  5. Set the Output type (Number, Text, Date, Boolean) so the component knows how to format it.
  6. Save. The field appears in the section field list with an fx badge.

Expression syntax

Calculated fields use a formula language similar to Excel:

ElementSyntaxExample
Field reference[FieldName][ActualCost]
Parameter reference{ParameterName}{TargetBudget}
Arithmetic operators+ - * /[EV] - [AC]
Comparison operators= <> > < >= <=[Float] <= 0
Logical operatorsAND, OR, NOT[Status] = "A" AND [Float] > 0
IF statementIF(condition, true_value, false_value)IF([CPI] >= 1, "On track", "Overrun")
SWITCH / CASESWITCH([Field], val1, result1, val2, result2, default)SWITCH([RAG], "R", "Red", "A", "Amber", "G", "Green", "Unknown")
String functionsCONCAT(a, b), LEFT(s, n), RIGHT(s, n), MID(s, start, n), LEN(s), UPPER(s), LOWER(s), TRIM(s)CONCAT([Discipline], " - ", [Zone])
Math functionsABS(n), ROUND(n, d), FLOOR(n), CEILING(n), MIN(a, b), MAX(a, b), SQRT(n)ROUND([EV] / [BAC] * 100, 1)
Date functionsTODAY(), NOW(), DATE(y,m,d), DATEDIFF(unit, d1, d2), DATEADD(unit, n, d)DATEDIFF("day", [BaselineFinish], [ForecastFinish])
Aggregate functions (measure scope only)SUM([Field]), AVG([Field]), COUNT([Field]), MIN([Field]), MAX([Field])SUM([ActualCost]) / SUM([PlannedCost])
NULL handlingISBLANK([Field]), COALESCE([Field], default)COALESCE([ForecastFinish], [BaselineFinish])

Common calculated field examples

Use caseExpression
Cost variance[EV] - [AC]
CPI[EV] / [AC]
% complete (text)CONCAT(ROUND([PercentComplete] * 100, 0), "%")
RAG labelIF([Float] < 0, "Red", IF([Float] <= 5, "Amber", "Green"))
Days from baselineDATEDIFF("day", [BaselineFinish], [ForecastFinish])
Display dateCONCAT(LEFT([PeriodName], 3), " ", YEAR([PeriodStart]))

Design rule

Use parameters for values the report consumer should choose or that change between report runs. Use calculated fields for values the report should compute consistently, regardless of who runs it or when.