|
Sas Pros:
I have a user who has created the PROC REPORT procedure below (Pete is
one of COBOL programmers and new to SAS).
After having some trouble with the COMPUTE block itself (forgot the
.SUM), the goal is to output to both HTML and PDF. He's most of the way
there, but the code in the LINE statements is not aligning in columns.
Our proc Report manual has disappeared -- I'm sure there is an easy way
to do this, but haven't found it yet !
We have SAS v8.2 on the mainframe, and SAS v9 on the desktop. Pete's
program is being run on the mainframe (v8.2). We do have the v8 SAS Ods
guide, but nothing has jumped out.
An example program, with data, is embedded below, and attached as a text
document -- any and all help will be much appreciated !
Thank you.
-Gerry
Gerard T. Pauline
Mgr, Internet Applications &
University WebMaster
Computer Systems, DoIT
Pace University
=======================================================================
Data F180_REPT
;
Input (OBJECT OBJ_CATAGORY BUDGETT OBLIGT OVUD PERCENT
LEVEL)
($2. +1 $Char27. +1 10.2 +1 10.2 +1 10.2 +1 6.3 +1 $1.)
;
DataLines
;
1F FULLTIME 2122221.00 1014460.65 1107760.35 47.802
A
2P PARTIME 45326.00 38251.83 7074.17 84.393
A
3W COLLEGE WORK STUDY 35000.00 3289.03 31710.97 9.397
A
4B BENEFITS 399421.00 177689.01 221731.99 44.487
A
5M MARKETING and PUBLICATIONS 17640.00 5917.16 11722.84 33.544
B
5S SUPPLIES and SERVICES 1271196.00 477426.76 793769.24 37.557
B
6I INTERNAL USAGE FEES 53209.00 30716.53 22492.47 57.728
B
7C CAPITAL 27540.00 16220.54 11319.46 58.898
B
9R CONTINGENCY 269458.00 0.00 269458.00 0.000
B
Run
;
Ods HTML File='F180 HTML I' Rs=NONE
;
Ods PRINTER PDF File='F180 PDF I'
;
Proc REPORT Data=F180_REPT NOWD HEADSKIP LS=132
PS=76
Style(COLUMN) = {Font_Face=GEORGIA Font_Style=ITALIC Font_Weight=BOLD
}
Style(LINES) = {Foreground=Red BackGround=Grey
Font_Face=GEORGIA
Font_Style=ITALIC Font_Weight=BOLD Font_Size=3}
;
Title ' Pace University '
;
Title2 'Expenses: Area of Information Technology'
;
Title3 "As of &SYSDATE"
;
Col (LEVEL OBJ_CATAGORY BUDGETT OBLIGT OVUD PERCENT)
;
* Define OBJECT / NOPRINT
;
Define OBJ_CATAGORY / DISPLAY 'Category'
;
Define BUDGETT / ANALYSIS SUM FORMAT=DOLLAR16.2 'Budget'
;
Define OBLIGT / ANALYSIS SUM FORMAT=DOLLAR16.2 'Obligated'
;
Define OVUD / ANALYSIS SUM FORMAT=DOLLAR16.2 'Over'
;
Define PERCENT / DISPLAY FORMAT=PERCENT9.3 'Percent'
;
Define LEVEL / GROUP noprint
;
Compute After LEVEL
;
PERCENT2 = OBLIGT.Sum / BUDGETT.Sum
;
Line @50
'----------------'
@68
'----------------'
@88
'--------------'
@103 '---------'
;
Line @21 'Total:
'
@50 BUDGETT.Sum
Dollar16.2
@68 OBLIGT.Sum
Dollar16.2
@86 OVUD.Sum
Dollar16.2
@104 PERCENT2 Percent9.3
;
Line @50
'----------------'
@68
'----------------'
@88
'--------------'
@103 '---------'
;
Line ' '
;
EndCompute
;
RBreak After / Dol Dul Summarize
;
Run
;
Ods HTML Close
;
Ods PRINTER Close
;
|