BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
colleenbogucki
Calcite | Level 5

Hello, 

 

I am using ods tagsets.rtf to print several outputs of proc report to a word document.  Everything is working well except an extra table row/page break appears whenever one of the tables spans multiple pages (pic below). 

 

It appears as a black rectangle at the top or bottom of the page then the rest of the table is either a page below or right below. It originally said "Continued" in it but I used the pretext="" code in the template to make it blank. Anybody know how to get rid of the actual box and space it takes up? I want no message of "continued" and no indication that the table was split, I just want the table to continue on the next page. 

 

I can't post the data. 

 

My template code: 

proc template;
      define style styles.siteprofile;
          parent=styles.sasweb;
          style Continued from Continued / 
              pretext=""; 
          style parskip / fontsize = 1pt;
      end;
run;
 
My ods code: 
ods tagsets.rtf file="filepath\file.rtf" startpage=off style=styles.siteprofile uniform;
 
    title "County1"; 
 
proc report data = county1._admin
     style(header)={background=aliceblue foreground=black};
     column administrative col1;
     define administrative / style(column)=[cellwidth=4.5in]
     style(header)=[just=l];;
     define col1 / '' style(column)=[cellwidth=2.5in];
run;
 
proc report data = county1._fund
    style(header)={background=aliceblue foreground=black};
    column funding col1;
    define funding / style(column)=[cellwidth=4.5in]
    style(header)=[just=l];
    define col1 / '' style(column)=[cellwidth=2.5in];
run;
 
proc report data = &county._rentasst
    style(header)={background=aliceblue foreground=black};
    column assistance col1;
    define assistance / style(column)=[cellwidth=4.5in]
    style(header)=[just=l];
    define col1 / '' style(column)=[cellwidth=2.5in];
run;
 
ods tagsets.rtf close;
 
I've also tried adding "class continued / width=0%" to the template and it just makes the box small, but the page break is still there. 
 
img2.JPG
1 ACCEPTED SOLUTION
6 REPLIES 6
ballardw
Super User

Without your data can't test for identical behavior.

 

Did you try completely removing the Pretext line? Actually I would suggest removing the style parskip part as well to clear all definitions.

 

proc template;
      define style styles.siteprofile;
          parent=styles.sasweb;
          style Continued from Continued / 
; end; run;
colleenbogucki
Calcite | Level 5

Thanks for the suggestion. If you run what you have, the word "Continued" still appears in the box and sometimes causes a page break. 

ballardw
Super User

Possibly using the wrong parent and that's why you still get the text "Continued". The best I come up with is

proc template;
      define style styles.siteprofile;
          parent=styles.sasweb;
          style Continued from TitlesAndFooters / 
          ; 
          style parskip / fontsize = 1pt;
      end;
run;

Which has no text but still displays a skinny box that most options I play with start inserting oddly spaced table breaks and still has a box of some sort.

However using ODS RTF and not TAGSETS.RTF the box doesn't appear though can't use the TAGSETS options like UNIFORM.

 

Maybe @Cynthia_sas has additional ideas

 

Cynthia_sas
SAS Super FREQ

Hi:

  My memory is that sometimes when both ODS RTF and ODS TAGSETS.RTF are finished writing the RTF file and the file from ODS is handed off to Word, it is possible for Word to mis-measure the page breaking and insert a blank page. I thought I remembered a Tech Support note about this, but I can't find it. I think it might be better for the OP to work with Tech Support on this question because TS can look at ALL their code and at their actual data and see if they can replicate the problem.

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
  • 6 replies
  • 587 views
  • 1 like
  • 4 in conversation