BookmarkSubscribeRSS Feed
SASUserMD
Obsidian | Level 7

Hello,

 

I use ods rtf text to set the TOCs for the table of contents. Now I got a problem with PROC REPORT when I use the ID statement and the page option to insert a page break. As you can see in the following example: For price 1 to 6 there is only a heading on the first page while price 7 to 12 and price 13 to 16 has a heading on each page. When you now delete the ods rtf text, there will be a heading on each page. Can you help me to fix this problem? Why has PROC REPORT a problem with ods rtf text?

 

 

ods rtf startpage=yes;

PROC TABULATE DATA=sashelp.pricedata;
	class regionName;
	table regionName , N;
RUN;

ods rtf startpage=now;
ods rtf text="\\TOC ...";

PROC REPORT DATA=sashelp.pricedata(obs=60);
	columns regionName price1 - price16;
	define regionName / display id;

	define price7 / page;
	define price13 / page;
RUN;

ods rtf close;

Thanks for your comments.

 

3 REPLIES 3
VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

@SASUserMD should this


 
define price7 / page;
define price13 / page;

be this


 define price1 / page;
define price6 / page;

SASUserMD
Obsidian | Level 7

No, I want a page break before price 7 and 13. But the real problem is the heading. Why is there no heading on the second page after PROC REPORT only - see attachment.

Cynthia_sas
SAS Super FREQ

Hi:
I suggest you review this paper https://support.sas.com/resources/papers/proceedings14/SAS038-2014.pdf especially the section titled "What if my Output is Too Wide" that starts on page 12 -- we have an example that shows the headers do not repeat on the "overflow" page. I believe you'll have to try some of the techniques we outline in the paper. Also, I recommend getting the page breaks and headers working as you want before worrying about the TOC. Also, between ODS PROCLABEL statement and CONTENTS= inside PROC REPORT, I don't typically find the need to use ODS TEXT to alter what appears in the TOC.


Cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 753 views
  • 0 likes
  • 3 in conversation