The SAS Output Delivery System and reporting techniques

OSD PDF Report

Reply
N/A
Posts: 0

OSD PDF Report

Hi all,

Please help me its very urget.I have tried with proc report and print , but ididn;t get the below formatted report.

Name Age Height
preethi 23 5.7

tamilselvi 24 5.2
kumari 24 5.1

nirmala 24 6.0

kamini 25 5.5
SAS Super FREQ
Posts: 8,863

Re: OSD PDF Report

Posted in reply to deleted_user
Hi: It is hard to understand exactly what it is you want to do. If you want to produce a report with the Headers in BOLD, that is possible with both PROC PRINT and PROC REPORT.

If you want to insert or "skip" a line between selected observations, you can do that with PROC REPORT.

If you want to underline selected columns based on some criteria, this WILL be possible starting in SAS 9.2. However, right now in SAS 9.1.3, you could apply some other kind of text highlighting based on a condition with PROC REPORT.

If you want to highlight the last row of data and make it bold, you can also do that with PROC REPORT, however, you may have to know ahead of time what the last row of data will be in order to code the correct condition for the CALL DEFINE statement. If you run the attached program, you will see that the rows are organized by AGE and there is an empty line after each group of ages. Also, highlighting has been done for the Age and Height columns only on the last person in each age. Finally, the last row in all the data has been made bold. Of course, if you have different variables or different ordering requirements, then your COMPUTE block logic would have to change.

I used the JOURNAL style, because that suppresses the interior table lines and produces the cleanest table. If you do not like the output from the JOURNAL style or if you want to change it, then you would have to modify the Style template.

For help with the PROC REPORT code to fit your particular needs or for help with the STYLE template, your best bet is to contact Tech Support (http://support.sas.com/techsup/contact/index.html )because they can open a track for you and keep it open until all your questions about this particular report are resolved. Other resources on PROC REPORT are our training classes, numerous SUGI and user group papers on PROC REPORT and an upcoming book by Art Carpenter on the subject.

Good luck!
Cynthia[pre]
*** the code;
ods listing close;
options center orientation=portrait nodate;

ods pdf file='c:\temp\selvi.pdf'
style=journal;

proc report data=sashelp.class nowd
style(report)={cellpadding=2px cellspacing=2}
style(header)={font_weight=bold};

column age name dispage height;
define age /order noprint;
define name /order;
define dispage/computed "Age";
define height /display;
compute name;
if name = 'Philip' then
call define
(_ROW_,'style',
'style={font_weight=bold}');
endcomp;
compute height;
if name in ('Thomas','Robert','Jeffrey',
'Judy', 'William') then do;
call define
(_COL_,'style',
'style={background=yellow}');
call define
('DISPAGE','style',
'style={background=pink}');
end;
endcomp;
compute before age;
tmpage = age;
endcomp;
compute dispage;
dispage = tmpage;
endcomp;
compute after age;
line ' ';
endcomp;
run;
ods pdf close;
[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 166 views
  • 0 likes
  • 2 in conversation