Text expressions

Tex expressions fetch and format text data, such as the name of the reporting entity and currency symbols.
Expression
Description
reporting.CurrentClient.Name
Fetches the name of the reporting entity as shown in the list of reporting entities.
System.Threading.Thread.
CurrentThread.CurrentCulture.NumberFormat.
CurrencySymbol
Currency symbol as defined in the regional settings of the reporting entity.
reportHelper.CurrentPeriod.YearPeriod
Automates the wording of the financial period. Returns 'year' if the financial period is a year, or 'period' if it's a period.
reportHelper.Text.StartSentence(Expression)
Capitalizes the leading letter in the 1st word of the expression.
calculatedRow.PositiveNegativeText('profit/(loss)')
Automates the wording of profit/(loss) in tables based on the value of the table row.
Table shows:
  • 'Profit' if both periods show profit
  • 'Loss' if both periods show loss
  • '(Loss)/profit' if current period is loss and prior is profit
  • '(Profit)/loss' if current period is profit and prior is loss
reportHelper.Text.StartSentence
(calculatedRow.PositiveNegativeText
('profit/(loss)'))
Capitalizes the leading letter of the 1st word with the profit/(loss) automation. Useful for starting table row narratives, for example, 'Profit for the year'.
calculatedRow.PositiveNegativeText('gain/(loss)')
This calculation functions similarly to the profit/(loss) case, but uses 'gain/(loss)' wording. You can easily update for other terms like income/(loss).
if
reporting.Queries.CategoryValueOrZero('Profit', 0.01m, 'CurrentPeriod', null, null, false, null) < 0
then
'profit'
else
if
reporting.Queries.CategoryValueOrZero('Profit', 0.01m, 'CurrentPeriod', null, null, false, null) > 0
then
'loss'
Automates the wording of 'profit', 'loss', or 'result' within narratives using 'if-else' logic.
Example: "The profit for the year was £2,000,000".
This expression returns:
  • 'profit' when the category value for profit in the current year is less than zero (representing a credit, hence a negative value).
  • 'loss' when the category value for profit in the current year is greater than zero (representing a debit, hence a positive value).