The SAS Output Delivery System and reporting techniques

ODS RTF TEXT

Accepted Solution Solved
Reply
Contributor
Posts: 33
Accepted Solution

ODS RTF TEXT

Hello,

 

I would like to put a text above a chart (generated by proc sgpplot) so I trythis code

ods rtf text = "^S={just=c } The Text ";

 

the problem I encounter is that the text in the output is the whole text between " " so ^S={just=c } The Text

and not only "The text"

Thanks in advance for your help

Nasser


Accepted Solutions
Solution
Wednesday
Contributor
Posts: 33

Re: ODS RTF TEXT

hello,

 

this is the solution below.

ods escapechar='^';

ods text ="^S={width=100% just=c } Go to SAS HomePage" ;

 

I forgot the green line code.But then It works

Nasser

View solution in original post


All Replies
Super User
Posts: 17,811

Re: ODS RTF TEXT

Try the following:

ods rtf text = "The Text ";

or:

 

title j=c 'The Text';

You may need to modify the ODS RTF settings to get the title exactly where you want it, you can use the BODYTITLE option to include the TITLE in the body of the text, not the header.

 

If you're stilling having issues, I suggest you include some full code, with the SGPLOT and output included so we can clearly see what the issue is.

Contributor
Posts: 33

Re: ODS RTF TEXT

Title 'Amortissement'  ;



%macro Loop_Rac_ODS(count) ;
ODS RTF startpage = yes   FILE = "&filename." style = Sapphire NOGTITLE NOGFOOTNOTE BODYTITLE ;
%Do i=1 %To &count ;
	proc sql noprint ;
	select RAC_Label into :v_RAC_Label from RAC_Values where RAC_Indexe = &i ;
	quit ;
	
title j=c 'The Text';


	proc sgplot data = BEH_INDIC_7 (where=(RAC="&v_RAC_Label.")) ; 
 		series x = ANNEE_AMO_SUITE y = ratio / group = &v_AXE. lineattrs=(pattern=solid)  ;
  		xaxis display=(nolabel);
  		yaxis display=(nolabel);
  		KEYLEGEND / title = "" NOBORDER ;
	run;
%End ; 
ODS RTF CLOSE ;
%Mend Loop_Rac_ODS ;		


%Loop_Rac_ODS(3) ;

this is the whole code

 

I would like to keep the main title "Amortissement" in the header that 's why I mention "NOGTILE" but whenever I mention

title j=c 'The Text'; as you suggess, the main title is removed from the header

Super User
Posts: 17,811

Re: ODS RTF TEXT

BODYTITLE is what removes the title from the HEADER. 

 

Thanks for the code but I don't know what your issue is still. And I can't run it because we don't have data, so if you could simplify it to use a SASHELP dataset that may help.

Solution
Wednesday
Contributor
Posts: 33

Re: ODS RTF TEXT

hello,

 

this is the solution below.

ods escapechar='^';

ods text ="^S={width=100% just=c } Go to SAS HomePage" ;

 

I forgot the green line code.But then It works

Nasser

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 154 views
  • 0 likes
  • 2 in conversation