Decimal datatypes are supported in reports, but in previous releases of InfoMaker, decimal values were converted to doubles in InfoMaker expressions. InfoMaker 10.5 adds support for decimal values in InfoMaker expressions and new InfoMaker expression functions to support decimal values. You can also use decimal values as retrieval arguments. In InfoMaker 10.5, the decimal datatype supports up to 28 digits.
The following arithmetic operators now return a decimal value if both operands have a datatype of decimal:
Operator |
Meaning |
Example |
|---|---|---|
+ |
Addition |
Subtotal + Tax |
- |
Subtraction |
Price - Discount |
* |
Multiplication |
Quantity*Price |
/ |
Division |
Discount/Price |
If either operand is not a decimal, the returned value is converted to a double datatype. The exponentiation operator (^) continues to return a double.
Relational operators that operate on numeric values (including =, >, <, <>, >=, and <=) can take decimal operands. The precision of the decimal operand is maintained in comparisons.
The following functions return a decimal datatype if their arguments are decimals: Sum, CumulativeSum, Avg, Median, First, Last, Max, Min, Large, Small, Var, VarP, Mod, Mode, Abs, Case, If.
The following new functions return a decimal result instead of a double: CrosstabAvgDec, CrosstabMaxDec, CrosstabMinDec, and CrosstabSumDec.
The new Dec function
converts a string to a decimal. You can also append the letter D
in upper- or lowercase to identify a number as a decimal constant
in a report expression. For example, 2.0d and 123.456789012345678901D are treated
as decimals.
Decimal and Decimal array have been added to the list of types in the Specify Retrieval Arguments dialog box.
For descriptions of the new functions, see the User’s Guide or the online Help.