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
Diamond | Level 26
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
Diamond | Level 26
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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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