BookmarkSubscribeRSS Feed
jplarios
Quartz | Level 8
HI:
Currently, I have a dataset printout into PDF and when the output fills a page it goes to the next as expected. Is it possible to, say, if I have a dataset with very few columns to print into the same page next to each other and once filled , fill the other page the same?

thanks for any input,
jp Message was edited by: jplarios
4 REPLIES 4
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Investigate using ODS PDF options COLUMNS and STARTPAGE. Also, ODS LAYOUT, combined with ODS PDF, may also be useful for your interests.

Scott Barry
SBBWorks, Inc.

Recommended Google advanced search argument on this topic:

ods pdf multiple columns site:sas.com
jplarios
Quartz | Level 8
SBB,
Thanks again. The COLUMNS = works.

What about an option to move a hyperlink to the middle.
For example I have a hyperlink as:
ods pdf text = "^S={JUST=CENTER VJUST=MIDDLE CELLHEIGHT=20PT FONT_SIZE=10PT CELLWIDTH=10CM URL='#Detail2'} Click for Detail ";

However the box is forced to the left. I would like to move this more to the middle. I was looking at different options however could not find the one that would move this. any clues?

Thanks,
jp Message was edited by: jplarios
Cynthia_sas
SAS Super FREQ
Hi:
The text placed by ODS ... TEXT= is styled by the USERTEXT style element in the style template. I usually change the style template for the TEXT element. You can change everything except URL= in a simple style template change, as shown below.

cynthia
[pre]

ods path work.temp(update) sashelp.tmplmst(read);

**1;
proc template;
define style styles.ctrtext;
parent=styles.printer;
style usertext from usertext /
just=center
font_size=10pt
font_weight=bold;
end;
run;

ods pdf file='c:\temp\center_works.pdf' style=styles.ctrtext columns=2;
ods escapechar='^';

title '1) This Works -- using default cellwidth and cellheight';
proc print data=sashelp.class(obs=2);
var name age height;
run;

ods pdf text = "^S={URL='#Detail2'} Click for Detail ";

proc print data=sashelp.class(obs=3);
var name sex weight;
run;
ods _all_ close;

**2;
proc template;
define style styles.chgurl;
parent=styles.printer;
style usertext from usertext /
just=center
font_size=10pt
font_weight=bold
cellwidth=10cm
cellheight=20pt
vjust=middle;
end;
run;

ods pdf file='c:\temp\center_also_work.pdf' style=styles.chgurl columns=2;
ods escapechar='^';

title '2) 10CM seems too wide for CELLWIDTH';
proc print data=sashelp.class(obs=2);
var name age height;
run;

ods pdf text = "^S={URL='#Detail2'} Click for Detail ";

proc print data=sashelp.class(obs=3);
var name sex weight;
run;
ods _all_ close;
[/pre]
jplarios
Quartz | Level 8
Thanks Cynthia . using proc template helped.
jp

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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
  • 4 replies
  • 1152 views
  • 0 likes
  • 3 in conversation