BookmarkSubscribeRSS Feed
scb
Obsidian | Level 7 scb
Obsidian | Level 7

I would like to put ABC appear same as LINE13 vertically, but I just could not get it. Anyone can help? Thanks.

 

 

ods pdf file='d:\odstest.pdf';

ods escapechar='^';

 

proc report data=sashelp.class(obs=1) nowd;

  compute after /style={just=l leftmargin=3in};

 endcomp;

run;

  

ods pdf text='^S={leftmargin=.75in}cde ^S={leftmargin=5.25in}ABC';

ods pdf text='^S={leftmargin=5.25in}LINE13';

 

ods pdf close;

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Why not put that information in the footnotes.  Almost all clinical outputs I have seen put code decodes and such like in footnotes.  Also, you will be better off creating an RTF file first, so you can use RTF markup, then convert to PDF.  Eg.

footnote "Page ^{thispage} of ^{lastpage}";

Never actually found a use for pdf text at all.

nehalsanghvi
Pyrite | Level 9

I don't think you can specify a margin twice. What you are trying to do is insert spaces between CDE and ABC such that ABC lines up with LINE13 on the next line.

 

This code does that by inserting 127 non-breaking spaces, but this is not a very good way to do it as you have to play around a lot to get the number of spaces just right and if you change the casing on the text or add/remove text before the spaces, you have to adjust the number of spaces again:

ods pdf text='^S={leftmargin=.75in}CDE ^{nbspace 127}ABC';
ods pdf text='^S={leftmargin=5.25in}LINE13';

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 743 views
  • 0 likes
  • 3 in conversation