Variable Format String

Hi, all I need to format a decimal value with variable precision. That is the number of decimal places must be defined at runtime according to a value found on a table. I defined a text variable TxPrecision and evaluated it like this: TxPrecision := '<Precision,' + Format(MyVar) + ':' + Format(MyVar) + '>' where MyVar is an integer containing the wanted number of decimal places The I applied the result in a format string: ResultString := FORMAT(DecNumber, 0, TxPrecision); I get a blank result. What did I wrong? Anna

Basta aggiungere <Standard format,0> et voilà magico navision TxPrecision := ‘<Precision,’ + Format(MyVar) + ‘:’ + Format(MyVar) + ‘><Standard format,0>’ Ciao

quote:

Basta aggiungere <Standard format,0> et voilà magico navision TxPrecision := ‘<Precision,’ + Format(MyVar) + ‘:’ + Format(MyVar) + ‘><Standard format,0>’ Ciao
Originally posted by MFlavio - 2006 Feb 10 : 06:41:43

Davveeero!!! [:P][:P][:P] Chissa’ se un giorno riusciro’ mai a capire come funziona il FORMAT? [Sigh…] Grazie mille! Anna

Good that everybody is able to understand italian in this forum !!!

quote:

Good that everybody is able to understand italian in this forum !!!
Originally posted by tb@softsys.at - 2006 Feb 10 : 07:24:34

Sorry, I was carried out! [:I] Flavio just showed me the right code (whch is in C/SIDE not in Italian [;)]) and I expressed my joy in finding a solution. Anna