# help with Format -- again please!

**URL:** <https://www.dynamicsuser.net/t/help-with-format-again-please/4775>\
**Category:** Developers Forum\
**Created:** [January 27, 2001, 3:40am UTC](https://www.dynamicsuser.net/t/help-with-format-again-please/4775 "2001-01-27T03:40:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![FormerMember](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@FormerMember](https://www.dynamicsuser.net/u/FormerMember)\
**Post date:** [January 27, 2001, 3:40am UTC](https://www.dynamicsuser.net/t/help-with-format-again-please/4775/1 "2001-01-27T03:40:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fabian](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@fabian](https://www.dynamicsuser.net/u/fabian)\
**Post date:** [January 28, 2001, 1:11am UTC](https://www.dynamicsuser.net/t/help-with-format-again-please/4775/2 "2001-01-28T01:11:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![FormerMember](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@FormerMember](https://www.dynamicsuser.net/u/FormerMember)\
**Post date:** [January 29, 2001, 2:30pm UTC](https://www.dynamicsuser.net/t/help-with-format-again-please/4775/3 "2001-01-29T14:30:02Z")

</div>

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??\*

---

<div class="post-metadata">

**Author:** ![FormerMember](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@FormerMember](https://www.dynamicsuser.net/u/FormerMember)\
**Post date:** [January 29, 2001, 2:30pm UTC](https://www.dynamicsuser.net/t/help-with-format-again-please/4775/4 "2001-01-29T14:30:02Z")

</div>

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??\*

---

<div class="post-metadata">

**Author:** ![rmotzer](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rmotzer](https://www.dynamicsuser.net/u/rmotzer)\
**Post date:** [January 29, 2001, 6:26pm UTC](https://www.dynamicsuser.net/t/help-with-format-again-please/4775/5 "2001-01-29T18:26:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fabian](https://avatars.discourse-cdn.com/v4/letter/f/f6c823/32.png) [@fabian](https://www.dynamicsuser.net/u/fabian)\
**Post date:** [January 30, 2001, 12:05am UTC](https://www.dynamicsuser.net/t/help-with-format-again-please/4775/6 "2001-01-30T00:05:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rmotzer](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@rmotzer](https://www.dynamicsuser.net/u/rmotzer)\
**Post date:** [January 30, 2001, 8:58am UTC](https://www.dynamicsuser.net/t/help-with-format-again-please/4775/7 "2001-01-30T08:58:56Z")

</div>

I forgot: the solution i mentined above only works with fixed fonts like courier.

---

<div class="post-metadata">

**Author:** ![FormerMember](https://avatars.discourse-cdn.com/v4/letter/f/74df32/32.png) [@FormerMember](https://www.dynamicsuser.net/u/FormerMember)\
**Post date:** [January 31, 2001, 2:22am UTC](https://www.dynamicsuser.net/t/help-with-format-again-please/4775/8 "2001-01-31T02:22:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AGUSTI](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@AGUSTI](https://www.dynamicsuser.net/u/AGUSTI)\
**Post date:** [February 28, 2001, 1:00pm UTC](https://www.dynamicsuser.net/t/help-with-format-again-please/4775/9 "2001-02-28T13:00:39Z")

</div>

See you codeunit 1, function FormatAutoTraducc (in ES2.60, prelast function).
