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

Hi,

I would like to have more control on my rtf output, by removing if possible line breaks that appear automatically between two proc  (in my example proc odstext, and proclist)

Here is my code:

 

proc template;
define style Styles.Custom; parent = Styles.Printer;
replace fonts /
'TitleFont' = ("Arial-BoldMT",13pt,Bold Italic) 
'TitleFont2' = ("Arial-BoldMT",12pt,Bold Italic) 
'EmphasisFont' = ("Arial",10pt,Italic)
'headingEmphasisFont' = ("Arial",11pt,Bold Italic)
'headingFont' = ("Arial",11pt,Bold) 
'docFont' = ("Arial",10pt) 
'footFont' = ("Arial",13pt) 
'FixedEmphasisFont' = ("Courier",9pt,Italic)
'FixedStrongFont' = ("Courier",9pt,Bold)
'FixedHeadingFont' = ("Courier",9pt,Bold)
'BatchFixedFont' = ("Courier",6.7pt)
'FixedFont' = ("Courier",9pt);
replace color_list /
'link' = blue 
'bgH' = vligb 
'bgT' = white 
'bgD' = white 
'fg' = black 
'bg' = white;
replace GraphFonts /
'GraphDataFont' = ("Arial",8pt)
'GraphUnicodeFont' = ("Arial",9pt)
'GraphValueFont' = ("Arial",10pt)
'GraphLabelFont' = ("Arial",11pt,bold)
'GraphFootnoteFont' = ("Arial",11pt,bold)
'GraphTitleFont' = ("Arial",12pt,bold)
'GraphAnnoFont' = ("Arial",10pt);
replace Table from Output /
frame = hsides
rules = none 
cellpadding = 4pt 
cellspacing = 0.25pt
borderwidth = 0.75pt ;
* Leave code below this line alone ;
style parskip / fontsize=1pt;
style SystemFooter from SystemFooter / font = fonts("footFont");
style Data from Data / background=color_list('bgD');
class UserText / font_size=10pt;
style paragraph from UserText "Controls the TEXT= style" /
outputwidth=100% 
protectspecialchars=off;
class body /topmargin = 0.75in
leftmargin = 0.75in
rightmargin = 0.75in
bottommargin=0.75in
outputwidth=100% ;
end;
run;
options compress=yes
nodate
nonumber
center
orientation=portrait;
ods escapechar='^';
ods rtf
file="&path\Résultats\tableaux\test.rtf"
bodytitle style=styles.custom startpage=no keepn style = Custom NOGTITLE nogfootnote
notoc_data ;

proc odstext;
p "Rédacteurs :";
run;
proc odslist;
item "^S={fontsize=10pt color=black}M ...." / style={liststyletype="diamond" color=blue fontsize=7pt};
item "blabla" / style={liststyletype="none" };
item "^S={fontsize=10pt color=black}M. ..." / style={liststyletype="diamond" color=blue fontsize=7pt};
item "blabla" / style={liststyletype="none" };
end;
proc odstext;
p "Relecteurs ";
run;

ods rtf close;
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

You can try using ODS TAGSETS.RTF instead of RTF. Most of the options are similar but the TAGSET has additional options.  What you would add to your ods tagsets.rtf would be an OPTIONS section that would look like:

ods tagsets.rtf file="<path>\filename.rtf" Options( Vspace='OFF' ) ;

 

Be advised that since basically all the output is a table you may end up with some appearance that you don't want.

 

 

View solution in original post

2 REPLIES 2
ballardw
Super User

You can try using ODS TAGSETS.RTF instead of RTF. Most of the options are similar but the TAGSET has additional options.  What you would add to your ods tagsets.rtf would be an OPTIONS section that would look like:

ods tagsets.rtf file="<path>\filename.rtf" Options( Vspace='OFF' ) ;

 

Be advised that since basically all the output is a table you may end up with some appearance that you don't want.

 

 

audreybr
Calcite | Level 5
Ok, thank you. Indeed, it is working using ODS TAGSETS.RTF. But some of my other options are not working now. I'll have to make choices...

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2363 views
  • 0 likes
  • 2 in conversation