Hi,
I have a Decimal Field whose Interger length is 23 and Decimal Length 2.
when i give some input it should not add zero before the Interger part.
I tried by giving a Display Pattern of the format
ZZZZZZZZZZZZZZZZZZZZZZ9.99.
Up to 16 digits(Interger part) the value is formated correctly.
when the length crosses 16 it is showing some other number
say for the input 1234567890123456 output is 1234567890123456.00
12345678901234567 output is 12345678901234566
12345678901234569 output is 12345678901234568
what is the reason for this.why that is not displaying the correct value.
This tip works in Acrobat and has not been converted to work with LiveCycle.
Shows how to format numbers in decimal, hex, and floating formats as well as formatting the value as a string.
You can cut-and-paste the following script into the JavaScript console, select the script, and press Enter. The resulting formatting is shown below under “Output.” (The “Math.PI” expression is a JavaScript constant equal to the value of π).
var n = Math.PI * 100;
// Decimal format:
console.println(util.printf("Decimal format:
%d", n));
// Hex format:
console.println(util.printf("Hex format: %x",
n));
// Floating point format:
console.println(util.printf("Float format:
%.2f", n));
// String format:
console.println(util.printf("String format:
%s", n));
Output:
Decimal format: 314
Hex format: 13A
Float format: 314.16
String format: 314.159265358979
Formatting: removing zeros so field is blank
My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.