sachinbaan
9th August 2014, 06:48
Hi,


I want to display amount with (,) Ex. 1,00,000 instead 100000.

bdittmar
9th August 2014, 14:14
Hi,

I want to display amount with (,) Ex. 1,00,000 instead 100000.

Hello,
maybe use sprintf$

function string sprintf$ (string format [, void ...])

Description

This formats a string and returns the formatted string. The format argument contains zero or more ordinary characters and substitution symbols. The ordinary characters are copied directly to the output string. The substitution symbols specify formats for the values specified in the expression arguments and are substituted by these formatted values.

The substitution symbols are used in the sequence in which they are specified. The first substitution symbol is used for the first expression argument. The second substitution symbol is used for the second expression argument, and so on.

In addition to a range of numeric type expressions, the function supports dates, amounts, single-byte strings, multibyte strings, bidirectional strings, and combined normal and bidirectional strings. input strings that contain bidirectional strings must be specified in logic order. The result is also returned in logic order.

Amounts

| Suppose the default currency is USD ($)

| and A001 is defined as "$$ 999T999T999VD99"

string result(80)

result = sprintf$("%A001", 1234.56)

| result contains "$ 000,001,234.56"

result = sprintf$("%-10A001,hfl", 1234.56)

| result contains "fl 000.001.234,56"

result = sprintf$("%-.10A001,hfl", 1234.56)

| result contains "001.234,56"; there is insufficient space

| for currency symbol

Regards

sachinbaan
11th August 2014, 06:16
Thanx
bdittmar

sachinbaan
11th August 2014, 08:28
hi,

I used display format on form field property -> ZZ,ZZ,ZZ,ZZ,ZZ9.