I can not figure out how the “string” feature works. I am trying to format a number in a contract so that the following amounts all line up. $ 35.65 $1,345.60 $ 546.00 etc.
Set the HorzAlign property in your report or form to “right”. That’s it. In fact this is the default for numeric values so you won’t acually have to do this explicitly. Marcus Marcus Fabian phone: +41 79 4397872 m.fabian@thenet.ch
I guess my question was to simplistic. I understand that I can use the left or right allignment for a field. My situation is I am building a contract using the following line*:=‘this is a sample cost of $’+format(typical dollars, 0,’<Precision,2:2><Standard Format,3>’)+’ for a typcial service.’; So all of my documents must be justified too! So I must be able to allow for a maximum value and still have $4,500.00 align with $ 320.00. Any Ideas anyone??*
I guess my question was to simplistic. I understand that I can use the left or right allignment for a field. My situation is I am building a contract using the following line*:=‘this is a sample cost of $’+format(typical dollars, 0,’<Precision,2:2><Standard Format,3>’)+’ for a typcial service.’; So all of my documents must be justified too! So I must be able to allow for a maximum value and still have $4,500.00 align with $ 320.00. Any Ideas anyone??*
Hi Mitch, try this one (here i assume a max. length of 10 digits): ‘$’+PADSTR(’’,10-STRLEN(FORMAT(Number)),’ ') + FORMAT(Number) You only have to replace the FORMAT(Number) with the format-command you need. Richard
I see no other chance than creating three fields, one for ‘this is a sample cost of $’ a second one for >format(typical dollars, 0,’<Precision,2:2><Standard Format,3>’)< and the third for ’ for a typcial service.’ Marcus Marcus Fabian phone: +41 79 4397872 m.fabian@thenet.ch
I forgot: the solution i mentined above only works with fixed fonts like courier.
Thanks for the suggestion. I had tried the padstr function but since it added on to the end it did not work. Stupid me I did not think to simply add it on first to the front. It just so happens this document will be in courier so your idea worked great. thanks
See you codeunit 1, function FormatAutoTraducc (in ES2.60, prelast function).