moonoobie
19th June 2009, 03:37
Hi,

While adding a field in the report layout, how do I specify to have the decimal point as comma? example: 123,000

Thanks!

amitmmokashi
19th June 2009, 06:59
Hi,
This change is a parameter level change and you need to run the session ttaad1106m000 (Generic Units) and maintain the Decimal sign as comma against the particular currency. Alternatively, you can take a string instead of float variable and replace '.' with ',' on the report.

Regards,
Amit Mokashi

baan.kmurali
19th June 2009, 13:59
you have to define one variable as string and assign the same value to this string variable.
ex:
value is the deciam point value

extern domain tcmcs.str10 d
d = str$(value(1,3))&","&str$(value(3,10))

hope this helps..

rahul.kolhe22
19th June 2009, 16:00
Hi,
Try changing the format for the double to be print on report to "ZZZ9VT99" in report layout. It will print comma instead of decimal.

Hope it helps.

Regards,
--Rahul

bdittmar
22nd June 2009, 22:50
Hi,
Try changing the format for the double to be print on report to "ZZZ9VT99" in report layout. It will print comma instead of decimal.

Hope it helps.

Regards,
--Rahul

Hello,

try "ZZZ9V.99"
or "ZZZ9V,99"

edit$()

--------------------------------------------------------------------------------

Syntax
string edit$( expression, string format(.) )

Description
This formats an expression according to a specified format.

Arguments
expression
The expression that must be formatted. This can be a floating point expression, an integer expression, or a string expression that returns an integer or a floating point value.

format
A string that defines the required format. The following formatting characters are available:

9
Use to reserve a position for a digit. Inserts a 0 if there is no significant digit in that position.


Z
Use to reserve a position for a digit. Inserts a space if there is no significant digit in that position. You can use this both before and after the decimal sign.


V
Use to indicate the position of the decimal sign. No decimal sign is displayed. To display a decimal sign, you must enter ‘D’, a period [.], or a comma [,] immediately after this character, depending on which decimal sign you wish to use.


D
Use to display the decimal sign as defined in the data dictionary.


T
Displays a thousand sign. The representation of the thousand sign is defined in the data dictionary.


-
If this is the first or last character in a format string, a negative value is prefixed or suffixed by a minus sign [-] and a positive value is prefixed or suffixed by a space. Minus signs in other positions have the same meaning as ‘Z’.


+
If this is the first or last character in a format string, a negative value is prefixed or suffixed by a minus sign [-] and a positive value is prefixed or suffixed by a plus sign [+]. Plus signs in other positions have the same meaning as ‘Z’.


*
If this is the first character in a format string, all spaces to the left of the most significant digit are filled with asterisks .


All characters other than those described above are copied directly to the output string. Periods [.] and commas [,] are exceptions. These are reserved for use as decimal signs and thousand signs.

If the format expression is enclosed by parentheses, these are displayed only if the result is negative.




Regards

moonoobie
23rd June 2009, 08:09
Thanks! It helps!

EdHubbard
23rd June 2009, 13:17
You may have the requirement to sometimes print with "," as a decimal and sometimes "." decimal. In which case, in the report script you would want to set up some rules to be able to achieve this.
In the below example, "str.value" is what appears on the report layout rather than the delivery quantity (tdsls045.dqua).

if ( tccom010.clan = " N" or tccom010.clan = "GER" or tccom010.clan = " F" ) then
str.value = shiftl$(edit$( tdsls045.dqua, "ZZZZZZZZ9V,999"))
else
str.value = shiftl$(edit$(tdsls045.dqua, "ZZZZZZZZ9V,999"))
endif

Hope this helps .....

Ed