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:
As you can see the is a normal-ish gap after the table.
But consider this output:
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.
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;
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.
also calling @Cynthia_sas
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?
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?
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!
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.