The SAS Output Delivery System and reporting techniques

ods pdf applying pagebreaks

Reply
Contributor
Posts: 47

ods pdf applying pagebreaks

Hi all,

I'm manually adjusting the height of one of my graphs, as a result the tables which are next to them can come on to the same page (which I dont want happening).

Is it possible to specify pagebreaks (similar to word) OR specify the page number for a proc gplot?

Thanks,
Sachin
SAS Super FREQ
Posts: 8,864

Re: ods pdf applying pagebreaks

Posted in reply to SachinRuk
Hi:
I'm not exactly sure what you mean. For example, if you are using ODS HTML, there are no page number tags defined in the HTML specification -- so there's no way to have page numbers in an ODS HTML document.

On the other hand, ODS RTF and ODS PDF are "paged" destinations -- so report output sent to those destinations would have the possibility of page numbers, however, the page number belongs to the "page" -- and as such, would not be appropriate to have a page number -inside- a graph image or a page number -inside- a report table.

However, there is a STARTPAGE=NOW option (for RTF and PDF) that allows you to instruct ODS to insert an explicit page break into report output. STARTPAGE=NOW could only be specified between procedure steps ---- it would not be appropriate to have the command anyplace but between procedures.

For me, the code below produces a 2 page document with a page break before the PROC MEANS output.

cynthia
[pre]
options nodate number pageno=1 center;
ods rtf file='c:\temp\use_sp.rtf' startpage=no;
ods pdf file='c:\temp\use_sp.pdf' startpage=no;

proc print data=sashelp.class(obs=3);
run;

proc freq data=sashelp.class;
tables sex;
run;

proc print data=sashelp.cars(obs=3);
var Make Model Type Origin DriveTrain MSRP Invoice;
run;

goptions reset=all hsize=6in vsize=3in;
proc gplot data=sashelp.class;
plot height*age;
run;
quit;

ods rtf startpage=now;
ods pdf startpage=now;

proc means data=sashelp.class;
var height;
class age;
run;

ods _all_ close;
[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 142 views
  • 0 likes
  • 2 in conversation