- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I am trying to figure out how to get the delta symbol and a superscript for one of my column headers to display in my proc report output, but I can't seem to get this to work. This is what I have so far. Any help is greatly appreciated!
options nodate nonumber center Orientation=landscape
topmargin=.5in bottommargin=.4in leftmargin=.5in rightmargin=.5in;
ods listing close;
protectspecialchars=off;
ods escapechar='^';
ods rtf file="&outpath&saveWordDoc..rtf" ;
title1 j=l font='Courier New' h=8pt "&titlename1 ^n &titlename2 ^n &titlename3" j=r "&sysdate9. &systime";
title2 j=l font='Courier New' h=8pt "&titleName4";
footnote j=l font='Courier New' h=8pt "&saveWordDoc..rtf" j=r "Page ^{thispage} of ^{lastpage}" ;
proc report nowd center spanrows missing split='^' data=all list out=test
style(report)=[width=100% frame=void rules=none cellspacing=0 padding=1pt font=('Courier New', 8pt)]
style(header)=[bordertopcolor=balck bordertopwidth=1
borderbottomcolor=black borderbottomwidth=1
background=white font=('Courier New', 8pt) textalign=c ]
style(column)=[font=('Courier New', 8pt) ASIS=ON ] ;
columns _PB_page vorder vid roworder rowlabel ("p-value^{super 1} LS Means^{unicode delta???} (95% CI)" col_4);
define _PB_page/group noprint;
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
A very common approach with testing something that "doesn't work" is to strip out as much unrelated code as possible so the only bit shown is actually pertinent.
Example:
ods escapechar='^'; proc report data=sashelp.class; column ('p-value^{super 1} LS Means^{unicode delta} (95% CI)' weight); define weight/display; run;
Which does display the superscript 1 and delta.
Then add options one at a time until it "doesn't work" again.
In this case it is the SPLIT option:
proc report data=sashelp.class split='^' ; columns ('p-value^{super 1} LS Means^{unicode delta} (95% CI)' weight); define weight/display ; run;
Which duplicates what you describe. SOLUTION: Either do not use the SPLIT option or use a different character and modify the labels to use that character.
What you failed to describe was that {super 1} and {Unicode delta} appeared at the start of separate lines within the header as the SPLIT character would do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
Did you try unicode delta without the ??? -- it seemed to work for me. Just curious.
PS... not sure why you have the protectspecialchars=off; as a statement, you should be getting an error message like this:
ERROR 180-322: Statement is not valid or it is used out of proper order.
for that.
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I put the ??? to show where I was confused on what I should be adding there. I have tried it without the ???, but all it prints is the actual text"unicode delta". Am I supposed to define the unicode before or in my proc report statement? Thank you so much for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
The code I posted is my entire code. You do need to establish your ODS ESCAPECHAR, as I show in my first line of code. But everything in my screen shot was produced by the code you see.
When I try using ODS RTF, I get this:
With this code:
ods escapechar='^';
ods rtf file='c:\temp\test_uni.rtf';
proc report data=sashelp.class(obs=3);
title 'this is^{super 1} and then something^{unicode delta}';
column ('Here is a delta^{unicode delta}' name age sex)
('and another^{super 2}' height weight);
run;
ods rtf close;
If you run my code and do not see the delta and the superscript in the RTF file, then you need to open a track with Tech Support.
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I added the ODS escapechar and
('p-value^{super 1} LS Means^{unicode delta} (95% CI)' col_4);
and it still is only printing "unicode delta" and "super 1"
I am not sure what else could be going wrong
options nodate nonumber center Orientation=landscape
topmargin=.5in bottommargin=.4in leftmargin=.5in rightmargin=.5in;
ods listing close;
ods escapechar='^';
ods rtf file="&outpath&saveWordDoc..rtf" ;
title1 j=l font='Courier New' h=8pt "&titlename1 ^n &titlename2 ^n &titlename3" j=r "&sysdate9. &systime";
title2 j=l font='Courier New' h=8pt "&titleName4";
footnote j=l font='Courier New' h=8pt "&saveWordDoc..rtf" j=r "Page ^{thispage} of ^{lastpage}" ;
proc report nowd center spanrows missing split='^' data=all list out=test
style(report)=[width=100% frame=void rules=none cellspacing=0 padding=1pt font=('Courier New', 8pt)]
style(header)=[bordertopcolor=balck bordertopwidth=1
borderbottomcolor=black borderbottomwidth=1
background=white font=('Courier New', 8pt) textalign=c ]
style(column)=[font=('Courier New', 8pt) ASIS=ON ] ;
columns _PB_page vorder vid roworder rowlabel ('p-value^{super 1} LS Means^{unicode delta} (95% CI)' col_4);
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Did you run MY code, exactly as I posted it? If you run MY code and it works, then you need to re-examine your code carefully to find the difference. If you run MY code exactly as I posted it and you do not see the delta or the superscript, then you need to open a track with Tech Support. They can look at ALL of your code and ALL of your data to determine whether it is due to that.
Also, I believe that the {unicode delta} capability was only available starting in SAS 9.2 or possibly 9.3 -- this is also something that you can check with Tech Support.
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
A very common approach with testing something that "doesn't work" is to strip out as much unrelated code as possible so the only bit shown is actually pertinent.
Example:
ods escapechar='^'; proc report data=sashelp.class; column ('p-value^{super 1} LS Means^{unicode delta} (95% CI)' weight); define weight/display; run;
Which does display the superscript 1 and delta.
Then add options one at a time until it "doesn't work" again.
In this case it is the SPLIT option:
proc report data=sashelp.class split='^' ; columns ('p-value^{super 1} LS Means^{unicode delta} (95% CI)' weight); define weight/display ; run;
Which duplicates what you describe. SOLUTION: Either do not use the SPLIT option or use a different character and modify the labels to use that character.
What you failed to describe was that {super 1} and {Unicode delta} appeared at the start of separate lines within the header as the SPLIT character would do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! It was the split option that was definitely throwing everything off
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@kmardinian wrote:
Thank you! It was the split option that was definitely throwing everything off
Another possible solution would be a different ESCAPECHAR but that may cause more confusion.
I haven't used much of the SPLIT options recently but used to use * so habitually it took me a minute to realize your split character and escapechar were the same character.