Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to show negative money amounts in a report

Status
Not open for further replies.

dbdinc

MIS
Apr 13, 2007
58
US
I know I'm asking a lot of questions recently, but I'm new to SAS. Anyway, is there, for Enterprise Guide, a report format that includes both a dollar sign and parentheses for negative money amounts? My boss wants the parentheses, and if he didn't, I could use the dollar format. Is it possible to redefine a format?

 
The easiest way to do this is by using the 'negparenX.' format.

ex.
Code:
format your_var negparen32.2;

Hope that this helps you.
Klaz
 
Thank you klaz,

will that also put a dollar sign onto the field? The reason I ask is that yesterday, I tried using the negparen (not the negparenx) format, and did get the parentheses, but no dollar sign.

I appreciate your assistance....thanks!
 
Klaz,

disregard my last posting...I figured out what you meant by saying negparenx. However, is there no way to include both a dollar sign and the parentheses in my formatted output?

Thanks so much!
 
You can create your own formats using Proc Format. You'll want to create a PICTURE format for this.
Look here, and read up on the PICTURE statement...
Should give you all you need. I used it a couple of times to create my own percent format for percentages that had already been multiplied by 100... It's pretty powerful and will be able to give you exactly what you need. There's examples at the bottom of the PICTURE statement page.
Enjoy.

Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
 
Thanks, Chris,

I'll play around with your suggestion and see what it does!

I appreciate your assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top