Put this expression in the report ...
iif(v<0,"(","")+ltrim(trans(abs(v),"#,###.##"))+iif(v<0,")",chr(160))
where v is the number you are formatting.
This field should be right-justified in the report or you can just put a padl()
around the expression.
If you do not use a monospace font, the widths of a right-paren and a
non-breaking space may not be equivalent.
B+
HALinNY
=> -----Original Message-----
=> From: [EMAIL PROTECTED]
=> [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
=> Sent: Wednesday, March 28, 2007 12:18
=> To: [email protected]
=> Subject: VFP 6: Formatting a negative value in a report
=>
=> I'm looking for a way to format a negative value in a VFP 6
=> report so that the value is wrapped in parens (no spaces)
=> and the numbers are aligned on the decimal point. The font
=> used is proportional. The "(@" format option displays spaces
=> between the left paren and the value and the numbers don't
=> line up nicely. Thanks.
=>
=> Regards,
=>
=> Andrew Baker
=> e-mail: [EMAIL PROTECTED]
=>
=>
=>
=> --- StripMime Report -- processed MIME parts ---
=> multipart/alternative
=> text/plain (text body -- kept)
=> text/html
=> ---
=>
=>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.