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
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
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.
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
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.
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
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.