The SAS Output Delivery System and reporting techniques

ODS PDF try to fit output in one page

Reply
Regular Contributor
Posts: 163

ODS PDF try to fit output in one page

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
Super Contributor
Super Contributor
Posts: 3,174

Re: ODS PDF try to fit output in one page

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
Regular Contributor
Posts: 163

Re: ODS PDF try to fit output in one page

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
SAS Super FREQ
Posts: 8,868

Re: ODS PDF try to fit output in one page

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]
Regular Contributor
Posts: 163

Re: ODS PDF try to fit output in one page

Posted in reply to Cynthia_sas
Thanks Cynthia . using proc template helped.
jp
Ask a Question
Discussion stats
  • 4 replies
  • 176 views
  • 0 likes
  • 3 in conversation