Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you align a number on a report by the decimal point?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00302779
Message ID:
00302891
Vues:
32
>That didn't work. The right ) for the negative number prints in the "pennies" column. Therefore, they line up like:
>(100.00)
> 200.00
>Any other ideas?

Sorry, I totally over-looked the part where you want negative numbers in parenthese. By using the parens, you are altering the output format of the numbers. I have always just used negative numbers and never had to figure out a solution to your problem. I am sure someone has done this and has a much better solution. All I can think of at the moment is to use an IIF() in the field expression and convert the number to a string.

iif(field1 < 0, lpad(field1, " ", 9), lpad(field1, " ", 12))

For the lpad(..., 12), you would have to figure out how many spaces the left paren actually takes up based on the font and size and use that.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform