BookmarkSubscribeRSS Feed
craig159753
Quartz | Level 8

Hi All,

I hope someone can help me, I am producing some RTF outputs destined to be opened in Microsoft Word, I have opted to use the ODS TAGSETS.RTF method. It works as in tended but I have started to notice odd inconsistencies between some of the outputs.

 

Now the titles and footnotes are printed within the body of the word document and not in the header and footer space found in Word, this is exactly what I want. The issue I have is with the space after the footnotes of my output and the footer space in word. There seems to be a large white gap in some outputs but not in others.

 

Let me explain, take this output:

Example 1Example 1

As you can see the is a normal-ish gap after the table.

 

But consider this output:

Example 2 - spillingExample 2 - spilling

The gap between the table and footer is a lot bigger, and the table is spilling as denoted by the "Continued" text. It is worth noting the next page is a single line, which looking at the first example would fit on the first page without spilling.

 

My question is, why is the second output spilling when there is clearly space? Is there an option which controls this white space?

 

I am using margins:

leftmargin=3.05cm

rightmargin=2.84cm

topmargin=2.54cm

bottommargin=2.54cm

 

Both outputs use the same style. I cannot post the full code, but both programs use near identical PROC REPORT (with the only difference being the column used and the labels. Below is some sample code, I have had to censor aspects of it.

 

proc report data=final split = "@" nowd missing headline;
    column xxx0 xxx1-xxx8;

    define xxx0 / order order=internal noprint;

    define xxx1 / order order=internal noprint;
    define xxx2 / order order=internal "XXXXXXX" style(header)=[just=l cellwidth=20%] style(column)=[just=l] id;
    define xxx3 / order order=internal noprint;
    define xxx4 / order order=internal "XXXXXXX" style(header)=[just=l cellwidth=14.5%] style(column)=[just=l] id;

    define xxx5 / display "XXXXXXX"  style(header)=[just=c cellwidth=16%] style(column)=[just=c vjust=top asis=on pretext="^R'\ql\li150 '"];
    define xxx6 / display "XXXXXXX"  style(header)=[just=c cellwidth=16%] style(column)=[just=c vjust=top asis=on pretext="^R'\ql\li150 '"];
    define xxx7 / display "XXXXXXX"  style(header)=[just=c cellwidth=16%] style(column)=[just=c vjust=top asis=on pretext="^R'\ql\li150 '"];
    define xxx8 / display "XXXXXXX"  style(header)=[just=c cellwidth=16%] style(column)=[just=c vjust=top asis=on pretext="^R'\ql\li150 '"];

    compute before xxx0 / style = [just=l font=("Courier New", 4pt)];
      line " ";
    endcomp;

    compute after xxx1 / style = [just=l font=("Courier New", 4pt)];
      line " ";
    endcomp;

    break after xxx1 / page;
  run;

Note: I am using a custom style, so I am guessing there could be an option which controls this space.

 

7 REPLIES 7
Ksharp
Super User

Check the option of it by 

ods tagsets.rtf file='c:\temp\temp.rtf' options(doc='help');
proc print data=sashelp.class;run;
ods tagsets.rtf close;

Ksharp_0-1641559111471.png

 

craig159753
Quartz | Level 8

Hi Ksharp,

 

Thanks for replying, I should have added, currently I am using the following options on the ODS line

    options(vspace="off" tables_off="off")

Toggling these has no effect on my issue.

Cynthia_sas
SAS Super FREQ
Hi:
I agree with @SASKiwi that TAGSETS.RTF may not be as smooth as ODS RTF. In either case, I think this is an issue for SAS Tech Support. If the code and data can't be posted publicly, that they is something that could be provided to Tech Support and they can work one on one with the person reporting the issue. In addition, they can try to match the version of SAS and the version of TAGSETS.RTF that is being used in this instance, along with the custom style.
Cynthia
craig159753
Quartz | Level 8

Hi Cynthia,

These reason I have opted for TAGESET.RTF over RTF is a trivial reason, notice in the images above, my first title is split into two titles, one of the left and the other on the right. As I require the TITLES and FOOTNOTES in the body of the output I am also using the BODYTITLE option.

I have tried several "solutions" none of which have worked.

Solution 1 (using RTF code):
title1 j=left "^R'\ql 'Some text^R'\qr 'Some other text";

Soltuin 2 (using JUST twice in the TITLE statement):
title1 j=left "some text" j=right "some other text";

Both of which did not work, with solution 1 having the text on the left and solution 2 having the text on the right. Any ideas?

SASKiwi
PROC Star

The ODS TAGSET methods are getting pretty old now and many haven't haven't been updated in a long time. Have you tried ODS RTF - this is much more recent and may work better?

craig159753
Quartz | Level 8
Thanks for commenting, please see my response to Cynthia above.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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