The SAS Output Delivery System and reporting techniques

Center caption under table using ODS TEXT= ?

Accepted Solution Solved
Reply
Contributor
Posts: 38
Accepted Solution

Center caption under table using ODS TEXT= ?

Hello all. I'm trying to create a simple table within an ODS RTF, with a caption centered underneath the table (as opposed a footnote all the way at the bottom of the page).

However, the text appears on the far left, rather than being centered. I have not been able to find a way to center that caption text.

Any help is appreciated, thank you.

Here is the code:

ods rtf file="c:\outputPERSON.rtf";

proc tabulate data = request3 format=value12.0; class agecat rsha_lhj; table  rsha_lhj ALL, agecat ALL;

format agecat agecatlabels.;

label rsha_lhj='County'; run;

ods text=" ";

ods text=" ";

ods text="Does not include counts under 5.";

ods rtf close;


Accepted Solutions
Solution
‎11-02-2012 04:17 PM
Super Contributor
Posts: 349

Re: Center caption under table using ODS TEXT= ?

Hi,

you need to use some thing like this..

ods escapechar='^';

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

Thanks,

Shiva

View solution in original post


All Replies
Super Contributor
Posts: 349

Re: Center caption under table using ODS TEXT= ?

Contributor
Posts: 38

Re: Center caption under table using ODS TEXT= ?

Hi Shiva- thanks for reply. I tried pasting the code in from that post, and what I get in the ouput RTF is:

-----

^S={width=100 just=c url='http:\\www.sas.com'hreftarget='_blank'} Go to SAS HomePage

----

(which by the way is left justified). It's as if something doesn't know that the S={} part is supposed to be processed. Any ideas what may be wrong?

Thanks.

Solution
‎11-02-2012 04:17 PM
Super Contributor
Posts: 349

Re: Center caption under table using ODS TEXT= ?

Hi,

you need to use some thing like this..

ods escapechar='^';

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

Thanks,

Shiva

Contributor
Posts: 38

Re: Center caption under table using ODS TEXT= ?

Thank you very much!

☑ This topic is SOLVED.

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

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