Hi All,
Need a help.
I would like to get the superscrip for b in a footnote in the report. like for example Patients b, this b needs to be displayed in the superscript form using sas code. Any suggestion would be really helpful.
Thanks Jag
This paper describes exactly what you need.
http://www2.sas.com/proceedings/sugi31/177-31.pdf
And a bit simpler code:
Subscript or Superscript in the footers/titles of RTF output | StudySAS Blog
Good luck!
Anca
Thank you Anca for your prompt response.
An explanation with an example will be very helpful to me as i a bit confused.
Thanks,
jag
OK, if you open the second paper you will see a good simple example:
************************************************************;
data test;
length secnam $15;
input sortord secnam $ pvalue;
cards;
1 demog 0.8812
2 ae 0.7112
3 disposition 0.8112
4 medicalhistory 0.9112
;
run;
ods listing close;
ods rtf file="Test output.rtf" style=rtfout;
ods escapechar='\';
proc report data = test missing split="$" spacing=0 headline nowd;
column sortord secnam pvalue;
define sortord / order noprint;
define secnam / order flow "Demographics$Variable\{super a}";
define pvalue / display flow "ANOVA$P-Value\{sub p}";
run;
ods rtf close;
ods trace off;
ods listing;
Hi Anca,
The above example works in the titles names, like the variable names, i need to display the superscript b with in the columns.
Thanks,
Jag
using the sample code above, you could add a format that will add the superscript. I am actually confused about waht do you need.
Basically, to add a superscript you define escapechar = '\', then add to the text you want superscript the "\{super b}"
Hmmm...
Can you give an example of the table?
proc format;
value $ col demog = "demog\{super a}" ae = "ae\{super b}";
quit;
ods listing close;
ods rtf file="Test output.rtf" style=rtfout;
ods escapechar='\';
proc report data = test missing split="$" spacing=0 headline nowd;
column sortord secnam pvalue;
define sortord / order noprint;
define secnam / order flow "Demographics$Variable\{super a}";
define pvalue / display flow "ANOVA$P-Value\{sub p}";
format secnam $col.;
run;
ods rtf close;
ods trace off;
ods listing;
Hi Arca,
you understood it well and what you have mentioned above works well. This is the same i require.
However it works well in the pc sas, however it is not working in sas on java platform.
So i would appreciate if you know any alternative way.
Thanks,
Jag
Jag,
I do not know the answer to your java platform problem.
Sorry, but hopefully someone around the forum will know it.
Best of luck!
Anca.
That's fine Arca. you provided a very useful answer earlier.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.