The SAS Output Delivery System and reporting techniques

Preventing Word from changing section number when using bodytitle and by op

Reply
Occasional Contributor
Posts: 5

Preventing Word from changing section number when using bodytitle and by op

I am using proc report in SAS 9.2 with ODS RTF. When I use the "break after pge/ page" (pge being a dataset variable) Word puts the second page into a new Section. This is causing problems when we link this report with others (using Word) into a complete documet. The version of Word we are using is Word 2002. I get the same result when I use the By option on the Proc Report. When I try to use the tagsets.rtf, it seems to be doing the same thing, putting the second page into a section by itself. Any ideas on how to stop this from happening? Thanks
SAS Super FREQ
Posts: 8,743

Re: Preventing Word from changing section number when using bodytitle and by op

Hi:
I don't think there's anything you can do with the original ODS RTF, but for ODS TAGSETS.RTF, there is a SECT= suboption that you can use to control whether a new section starts or not. The doc='Help' suboption will list all the available suboptions in the SAS log.

cynthia
[pre]
ods listing close;

data class;
set sashelp.class;
if sex = 'F' then pge=1;
else if sex='M' then pge=2;
run;

proc sort data=class out=class;
by pge;
run;

ods tagsets.rtf file='c:\temp\nosect.rtf'
options(doc='Help' sect='NONE');

proc report data=class nowd;
column pge name sex age height;
define pge / group;
define name / order;
break after pge / page;
run;

ods _all_ close;
[/pre]
Occasional Contributor
Posts: 5

Re: Preventing Word from changing section number when using bodytitle and by op

Cynthia,
Thanks much for your reply!!! This worked part way. It took the section problem away, but is now splitting my pages in half. This is something I've run into before, and have yet to find an answer for. Do you know how I can get tagsets=rtf to break when I want. It currently (with my break option) breaking when it wants and when I want. It seems to want to have a page break after about 20 lines. Do you know what I'm doing wrong? Thanks again for your help!! Robb
SAS Super FREQ
Posts: 8,743

Re: Preventing Word from changing section number when using bodytitle and by op

Hi:
Perhaps there's something wrong with your data (PGE is getting set incorrectly?) or perhaps there's something else going on with the data. To debug what's happening with TAGSETS.RTF, in this situation, your best bet is to open a track with Tech Support.

cynthia
Ask a Question
Discussion stats
  • 3 replies
  • 108 views
  • 0 likes
  • 2 in conversation