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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1 reply
  • 663 views
  • 0 likes
  • 2 in conversation