Rajg_baan
7th May 2015, 15:26
Hi All,
Do you know how can we align double or float values to domain format in script? I can not use tt.align.according.domain() as its args are strings.
BR/Raj
mark_h
7th May 2015, 15:40
I guess maybe I am missing something - what domain are you trying to go to? Just curious if you have edit$, sprintf, etc.
vahdani
8th May 2015, 10:01
Double values do not need alignment. They will be aligned correctly when displayed on Forms etc. They need only to be rounded according to the domain definition: round up or down and number of decimals places. In some cases such as sales quantities you need to round according to both domain and unit definitions.
Hier are the standard ways in LN:
|Domain round
#pragma used dll otccomdll0001 |Domain round
l.prte = tccom.dll0001.domain.round( tirou102.prte,
domainof(tirou102.prte))
|Quantity Domain Round:
#pragma used dll otccomdll0007 |Domain round
l.quan.iu = tccom.dll0007.qty.domain.round(
l.quan.iu, |Quantity in
"tcqiv1", |Domain
i.cuni) |unit