The SAS Output Delivery System and reporting techniques

ods page break issue

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 90
Accepted Solution

ods page break issue

Below is my code, my purpose is to print  data and text "aaaaaaaaaaaaaaaaa" in one page and "bbbbbbbbbbbbbbbbbbbbbbbbb' in another page.  How can I do it?  I do not know which option should I add between the two ods rtf text.

Thanks.

 

 

ods rtf file="C:\XXXXXXX\Desktop\111.rtf";
ods escapechar="^";
proc report data=sashelp.cars (obs=10);
run;
ods rtf text="aaaaaaaaaaaaaaaa";
ods rtf text="bbbbbbbbbbbbbbbbbbbb";
ods rtf close;


Accepted Solutions
Solution
‎02-16-2017 07:04 AM
Regular Contributor
Posts: 228

Re: ods page break issue

Posted in reply to Niugg2010

Hi, try to include ods startpage=now; 

HTH. 

ods rtf file="C:\XXXXXXX\Desktop\111.rtf";
ods escapechar="^";
proc report data=sashelp.cars (obs=10);
run;
ods rtf text="aaaaaaaaaaaaaaaa";
ods startpage=now;
ods rtf text="bbbbbbbbbbbbbbbbbbbb";
ods rtf close;

 

View solution in original post


All Replies
Solution
‎02-16-2017 07:04 AM
Regular Contributor
Posts: 228

Re: ods page break issue

Posted in reply to Niugg2010

Hi, try to include ods startpage=now; 

HTH. 

ods rtf file="C:\XXXXXXX\Desktop\111.rtf";
ods escapechar="^";
proc report data=sashelp.cars (obs=10);
run;
ods rtf text="aaaaaaaaaaaaaaaa";
ods startpage=now;
ods rtf text="bbbbbbbbbbbbbbbbbbbb";
ods rtf close;

 

Frequent Contributor
Posts: 90

Re: ods page break issue

Thanks. I tried and it works well.

Super User
Posts: 19,855

Re: ods page break issue

Posted in reply to Niugg2010

If I recall correctly, the text statement is similar to title in that a proc has to run before it's outputted to the RTF file. 

Frequent Contributor
Posts: 90

Re: ods page break issue

There are some difference. If there is no startpage=now. The content of ods text will be in the same page as the last output. 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 251 views
  • 0 likes
  • 3 in conversation