BookmarkSubscribeRSS Feed
SachinRuk
Calcite | Level 5
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
1 REPLY 1
Cynthia_sas
SAS Super FREQ
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]

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 775 views
  • 0 likes
  • 2 in conversation