The SAS Output Delivery System and reporting techniques

Reducingthe Line spacing

Reply
N/A
Posts: 0

Reducingthe Line spacing

Hi Friends,

I tried to write the dataset observation to PDF. But the PDF file has large line spacing between the two observations. Please help me how to reduce the line space.
And also i want to write some datas in bold (particular obsertion). Is it possible to use BOLD options in Put statement. please help me.

Thanks,
Selvi.
SAS Super FREQ
Posts: 8,861

Re: Reducingthe Line spacing

Posted in reply to deleted_user
Hi:
You may not need to use the DATA step for what you want to accomplish. It is very easy in PROC REPORT to highlight a whole row conditionally.

Consider the example code at the bottom. If you run the program, you will see that the output has every row where the age is 12 highlighted. In addition, I changed the font of the output to Courier New and removed the interior lines and borders (since that was something you wanted to do in a previous post.)

Perhaps this is something that might be an alternative to DATA _NULL_.
cynthia
[pre]
*** the code;
options center leftmargin=1in rightmargin=1in topmargin=1in bottommargin=1in;
ods listing close;
ods pdf file='c:\temp\bold_row.pdf';
ods escapechar='~';

title f="Courier New" bold 'My Title in Courier';
proc report data=sashelp.class nowd
style(report)={rules=none frame=void
cellspacing=0 cellpadding=2}
style(header)={font_face="Courier New"
font_size=12pt
background=white}
style(column)={font_face="Courier New" font_size=10pt};
column name age height;
define name / order;
define age / display;
define height/display;
compute age;
if age = 12 then
call define (_ROW_,'style',
'style={font_weight=bold font_face="Courier New"}');
endcomp;
run;
ods pdf close;[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 368 views
  • 0 likes
  • 2 in conversation