Date: Mon, 5 Mar 2001 15:44:25 -0500
Reply-To: "Ravi, Prasad" <Prasad.Ravi@PFIZER.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Ravi, Prasad" <Prasad.Ravi@PFIZER.COM>
Subject: Re: ODS style: altering alignment of table cells
Content-Type: text/plain; charset="iso-8859-1"
John:
In your DEFINE statement after '/' specify one of three
justification options LEFT, RIGHT or CENTER depending on which ever you
want.
Another option I would recommend is to use a WIDTH= option in the
same DEFINE statement to specify the max width of the character values or
the intervals so that there are no extract spaces.
he DEFINE statement describes how to use and display the specified report
item. If you do not use a DEFINE statement, PROC REPORT uses default
characteristics.
DEFINE report-item </ <usage> <attributes(s)>
<option(s)> <justification> <COLOR=color>
<'column-header-1' < . . . 'column-header-n'>>;
REPORT: Justifying Values of Report Items
You can justify the placement of the column header and of the values of the
item that you are defining within a column in one of three ways:
LEFT
RIGHT
CENTER
When justifying values, PROC REPORT justifies the field width defined by
the format of the item within the column. Thus, numbers are always
aligned.
-----Original Message-----
From: Blodgett, John G. [mailto:BlodgettJ@UMSYSTEM.EDU]
Sent: Monday, March 05, 2001 3:20 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: ODS style: altering alignment of table cells
I am using proc print (for now - will be using proc report later for the
final versions) to generate a series of reports in various formats (text,
html and pdf). I have a set of report variables to be displayed that are
actually composites of other numeric variables that have been pre-formatted
into character variables. (Typical values are single formatted character
strings such as "371,747" or numeric intervals such as "123,456 - 123,890".
See http://oseda.missouri.edu/mscdc/test/pl94trend.pdf for an example.)
Because these columns are now character strings, SAS generates an
"align=left" for them when creating html or pdf output. I would prefer to
have them right justified (or possibly centered).
My question is how can I overrride the default behavior and tell SAS to
right or center-justify data cells? Do I need to do it separately for each
proc or is their a universal specification?
John Blodgett
OSEDA (Office of Social & Economic Data Analysis)
626 Clark Hall -- University of Missouri
Columbia, MO 65211
PH: 573-884-2727 FX: 573-884-4635
e-mail: blodgettj@umsystem.edu
URL: http://www.oseda.missouri.edu/jgb/