The SAS Output Delivery System and reporting techniques

Superscript anumber from SAS DATASET in RTF ODS with proc report

Reply
N/A
Posts: 0

Superscript anumber from SAS DATASET in RTF ODS with proc report

I have a sas dataset with a variable units and the values of the units are displayed alike this when i open the sas data set.

"Basophils(x10~{super3}/u)"

I am using proc report for rtf ods output.

When I run the program with option "ods escapechar='~';"
In the final RTF output the number 3 is not superscripted but displaying as "Basophils(x10super3/u)". I am sure i am doing something wrong. Can any one suggest a way by which, without changing the SAS dataset, I can get the superscipt displayed in rtf output.

Thanks
SAS Super FREQ
Posts: 8,743

Re: Superscript anumber from SAS DATASET in RTF ODS with proc report

Hi:
When I run this code (shown below), I do get the expected results (superscript, subscript and the dagger symbol). So I'm not sure what's going on with your program. However, I do believe that the correct syntax is:
~{super 3}
~{sub 3}
...note the space between the 'super' or 'sub' and the number to be superscripted or subscripted. If your data does NOT have a space, then I do not believe the "super3" would be recognized and you might have to change the data file so that you were using the correct syntax..

I wasn't sure of the purpose for the "/u" in the data -- however if you intend to use RTF control strings in the data, I believe the control string for underline is \ul, not /u, as described here:
http://support.sas.com/rnd/base/ods/templateFAQ/Template_rtf.html#control
and
http://www2.sas.com/proceedings/forum2007/151-2007.pdf

cynthia
[pre]
data use_esc;
length stringvar $50;
infile datalines;
input stringvar & $;
put _all_;
return;
datalines;
Basophils(x10~{super 3})
Blastomeres(x10~{sub 3})
Basophils ~{dagger}
;
run;

ods listing close;
ods rtf file='c:\temp\use_esc.rtf';
ods escapechar='~';

proc report data=use_esc nowd;
column stringvar;
define stringvar / display;
run;
ods rtf close;

[/pre]
N/A
Posts: 0

Re: Superscript anumber from SAS DATASET in RTF ODS with proc report

Thanks for the help
Ask a Question
Discussion stats
  • 2 replies
  • 747 views
  • 0 likes
  • 2 in conversation