BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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.
1 REPLY 1
Cynthia_sas
Diamond | Level 26
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]

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 4707 views
  • 0 likes
  • 2 in conversation