BookmarkSubscribeRSS Feed
Matyas
Fluorite | Level 6

Hi,
I would like to know if there is a way how to supress last page break in proc report so I can use ods rtf text to put text immediately after the table and not on the other page.

Example code:

proc report data=data_table nowd split="~" out=pom;
		columns page p ord param value value0 value1;
	
		define page/order noprint;
		define p/order noprint;
		define ord/order noprint;

		define param/display style(header)=[just=l] style(column)=[asis=on indent=0 cellwidth=8.6cm ] " ";
		define value/display style(header)=[just=c] style(column)=[indent=0 cellwidth=4.47cm just=c] "Total~N=XXX";
		define value0/display style(header)=[just=c] style(column)=[indent=0 cellwidth=4.47cm just=c] "Group1~N=XXX";
		define value1/display style(header)=[just=c] style(column)=[indent=0 cellwidth=4.47cm just=c] "Group2~N=XXX";	

	    compute before p / style={cellheight=0.26cm FONTSIZE=1mm};
			line ' ';
	    endcomp;

		break after page / page;
	run;

ods rtf text="#S={outputwidth=100% just=l} {Region: Overall}"


Thank you for any suggestions..

3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
Have you tried using STARTPAGE=NO on the ODS RTF statement?
Cynthia
Matyas
Fluorite | Level 6

Thank you Cynthia, that works if I wont use

break after page / page;

because now the break statement doesnt start new page. I want to be able to break table after lets say it gets 13cm height, and still I want be able to add some text below table on last page with ods rtf text statement

Cynthia_sas
SAS Super FREQ
Hi:
I'm sorry, I don't understand what you mean when you say you "want to break table after .. it gets 13cm height" -- how does your "page" variable cause a break every 13 CM or 5+ IN? Or, do you just want approx 13 CM between the very last table and the ODS RTF TEXT?

Since there's no data to test with, it's very hard to visualize what it is you're currently getting and what it is you want. And since you have 3 ORDER variables, all as NOPRINT, it's nearly impossible to make fake data that would work with your program.

Cynthia

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