Money Report Functions
Below is an overview of the available report functions in the Money category. These functions can be used in expressions in the report layout.
ConvertToSymbol function
The ConvertToSymbol function displays the currency symbol. There are two variants of this function that can be used.
Definitions
string ConvertToSymbol(Money money)
string ConvertToSymbol(string currencyCode) Parameters
| Name | Description |
|---|---|
money | A Money object. |
currencyCode | The currency code. |
Return value
The currency symbol in text format.
DivM function
The DivM function divides one amount by another.
Definitions
Money DivM(Money first, Money second)
Money DivM(Money first, decimal second)
Money DivM(decimal first, Money second) Parameters
| Name | Description |
|---|---|
first | The amount to divide. |
second | The amount to divide by. |
Return value
The result of the division as a Money object.
Formattable function
The Formattable function allows a Money object to use the formatting provided by the report.
Definition
FormattableMoney Formattable(Money money) Parameters
| Name | Description |
|---|---|
money | A Money object. |
Return value
A FormattableMoney object that can use the report formatting.
MulM function
The MulM function multiplies one amount by another.
Definitions
Money MulM(Money first, Money second)
Money MulM(Money first, decimal second)
Money MulM(decimal first, Money second) Parameters
| Name | Description |
|---|---|
first | The amount to multiply. |
second | The amount to multiply by. |
Return value
The result of the multiplication as a Money object.
RoundM function
The RoundM function rounds the amount of the Money object to the specified number of decimal places. If no decimals are specified, the amount is rounded to a whole number.
Definitions
Money RoundM(Money money, int decimals)
Money RoundM(Money money) Parameters
| Name | Description |
|---|---|
money | The amount to round. |
decimals | The number of decimals to round to. |
Return value
The result of the rounding as a Money object.
SubM function
The SubM function subtracts one amount from another.
Definitions
Money SubM(Money first, Money second)
Money SubM(Money first, decimal second)
Money SubM(decimal first, Money second) Parameters
| Name | Description |
|---|---|
first | The amount to subtract from. |
second | The amount to subtract. |
Return value
The result of the subtraction as a Money object.
SumM function
The SumM function adds the amount of a Money object and a decimal.
Definitions
Money SumM(Money first, decimal second)
Money SumM(decimal first, Money second) Parameters
| Name | Description |
|---|---|
first | The amount to add. |
second | The amount to add to. |
Return value
The result of the addition as a Money object.