Reportizer Documentation
Contents Index

Examples of Expressions

Top Previous Next

1.

Printed: <<<DATE>>>

2.

5 + 3 * (dataset_sum(1, 0, 'Price') + 4 ) - 6

3.

dataset_count(1, 0, 'Payer')

4.

5.2 * SQRT(9)

5.

dataset_sum_ex(
  1, 
  0, 
  'PaymentSum', 
  'dataset_field_val(1, ''PaymentSum'') > 1000'
)

6.

100 * dataset_sum_ex(
  1, 
  0, 
  'PaymentSum', 
  'dataset_field_val(1, ''PaymentSum'') > 1000'
) / 
dataset_sum(1, 0, 'PaymentSum')

7.

'Percentage of this payment in all payments: ' + 
  to_string(
    100 * dataset_field_val(1, 'PaymentSum') / dataset_sum(1, 0, 'PaymentSum')
  )

8.

'This report uses the following SQL: ' + report_dataset_name

9.

SUBSTR(DATASET_FIELD_VAL(1, 'Category'), 3, 3)

10.

'Text ''She said'' found on this position: ' + 
  to_string(POS('SHE SAID', UPPER(DATASET_FIELD_VAL(1, 'Category'))))

11.

'Size of free programs in total size: ' + 
  to_string(
    ROUND(
	  100 * dataset_sum_ex(1, 0, 'SIZEKB', 'dataset_field_val(1, ''ISFREE'')') / 
	  dataset_sum(1, 0, 'SIZEKB')
    )
  ) + '%'

12.

'Payment date: ' + format_date_time(dataset_field_val(1, 'Pay_Date'), 'yyyy, mmmm, dd')

13.

'Current year: ' + format_date_time(date, 'yyyy')

14.

'Cotangent: ' + 
  cos(dataset_field_val(1, 'AngleInRad')) / 
  sin(dataset_field_val(1, 'AngleInRad'))

15.

dataset_field_val(1, 'Cust_Name') = 'Parker'

16.

pretty(
  number_to_words(
    dataset_field_val(1, 'PaymentSum'), 
    'en-US', 
    'UnitsSubunitsSeparator= and |CurrencyCode=USD|SubunitsDimension=2|ShowZeroSubunits=true'
  )
)

17.

This report contains <<<page_count>>> pages.