---
title: "Report Eval"
canonical: "https://support.appfire.com/space/REPS/472914949/Report%20Eval"
format: markdown
---
> Macro (aura-html)

## Description

Performs mathematical operations on reporting data. The results may be saved as a variable, accessible in the current context.

## Parameters

| Name | Required | Migratable to Cloud? | Default Value | Description |
| --- | --- | --- | --- | --- |
| [default] /name | - [(X)] | - [NO] |  | If provided, the result of the evaluation will be stored in a variable with the specified name. It is accessible via the [Variable Supplier](https://appfire.atlassian.net/wiki/spaces/SUPSR/pages/479036241) (e.g.: "variable:foo"). |
| default | - [(X)] | - [NO] |  | An %injectable% value that will be used if the expression does not evaluate to a valid result. |
| format | - [(X)] | - [NO] |  | A number format to output the result with.<br>e.g.: "#,##0.00". |
| hidden | - [(X)] | - [NO] | false | If set to **true**, the result will not be output. |

## Editor View

- Not applicable.

## Macro Edit View

- Not applicable.

## Notes

This macro differs from Scaffolding's Evaluate Data in a couple of ways.

1. The value is only stored temporarily. It can't be accessed from another page, for example.
2. It can access values outside of the Scaffolding add-on. Any number you can access from a Supplier can be used in a calculation.
3. There are no special functions for **sumtable** or **avgtable**. Instead, use the Stats On Supplier to generate that kind of data.

## Expressions

Expressions can be made up of the following:

| Description | Value |
| --- | --- |
| Description | Value |
| Numbers | 1.234, -987 |
| Variables | %prefix:value% |
| Basic operations | +, -, *, /, ^ |
| Trigonometry functions | sin(X), cos(X), tan(X), cot(X), sec(X), csc(X), arcsin(X), arccos(X), arctan(X) |
| Exponential functions | sqrt(X), exp(X), ln(X), log2(X), log10(X) |
| Shift functions | abs(X), trunc(X), round(X), floor(X), ceiling(X) |
| Constants | pi, e |
| Brackets | ( <expression> ) |
| Logic-valued expression | ( <logic expression> ) ? <true value> : <false value> |
| Logic operators | =, <>, <, >, <=, >=, !, &, |, |

## Examples

### Basic Mathematics

The following example simply calculates the value of a fraction.

```
Numerator: {number-data:Numerator|decimal=true}1{number-data}
Denominator: {number-data:Denominator|decimal=true}2{number-data}
Result: {report-eval:Result|format=#0.0}%data:Numerator%/%data:Denominator%{report-eval}
Percentage: {report-eval:Percentage|format=##0\%}round(%variable:Result% * 100){report-eval}

```

**Result**

Numerator:1  
Denominator:2  
Result:0.5  
Percentage:5000%

### Cylinder Calculations

Calculate the properties of a cylinder based on its radius and height.

```
|| Radius | {number-data:Radius|decimal=true} cm ||
|| Height | {number-data:Height|decimal=true} cm ||
|| Base Circumference | {report-eval:Circumference} 2 * pi * %data:Radius%{report-eval} cm ||
|| Base Area | {report-eval:Base Area}pi * %data:Radius%^2{report-eval} cm ^2^ ||
|| Side Area | {report-eval:Side Area}%data:Height% * %variable:Circumference%{report-eval} cm ^2^ ||
|| Total Surface Area | {report-eval}%variable:Side Area% + %variable:Base Area% * 2{report-eval} cm ^2^ ||
|| Total Volume | {report-eval}%variable:Base Area% * %data:Height%{report-eval} cm ^3^ ||

```

|  |  |
| --- | --- |
|  |  |
| Radius | 10<br>cm |
| Height | 30<br>cm |
| Base Circumference | 62.83185307179586<br>cm |
| Base Area | 314.1592653589793<br>cm <sup>2</sup> |
| Side Area | 1884.9555921538758<br>cm <sup>2</sup> |
| Total Surface Area | 2513.2741228718346<br>cm <sup>2</sup> |
| Total Volume | 9424.77796076938<br>cm <sup>3</sup> |

# Tutorial Examples

> Macro (contentbylabel)