Hi,
Am trying to assign a specific color to the 2symbols per below:
ods escapechar='^';
...
ods text='^{unicode 2588}^{unicode 2588} is a red box';
I've tried adding cominbinations of inline styles every way I can and struck out. Example:
ods text='^s={color=red}^{unicode 2588}^{unicode 2588} is a red box';
does not work.
Anyone know the magic combination?
Thanks!
--Ben
Hi, I have an example of using Unicode 2588 to "fake" a bar chart and another example of using Unixcode 250A to "fake" a dynamically sized box. However, both of those were accomplished in cells in PROC REPORT. You did not specify your destination, so it's hard to predict what will work in every destination, but this worked for me in HTML and should work for RTF and PDF.
ods escapechar='^';
ods text='1 ^{style[color=red font_face="Thorndale AMT" fontsize=16pt] ^{unicode 2588} ^{style[font_size=12pt font_weight=bold] is a red box}}';
ods text= ' ';
ods text='2 ^{style[color=red font_face="Thorndale AMT" fontsize=16pt] ^{unicode 2588}} ^{style[font_size=12pt font_weight=bold] is a} ^{style[color=red]red} box ';
Think of your UNICODE function as being the text string you want to have treated differently (appear in red). So that string, which happens to be a UNICODE function needs to be surrounded by a STYLE function (also invoked with ESCAPECHAR).
The way the style function works is this -- assuming ESCAPECHAR is ^:
'^{style[attr=val attr1=val1]text string}'
I know, the color coding is garish, but, I hope, makes the point that the STYLE function starts and stops with curly braces and the attribute/value pairs are enclosed in square brackets. After the ending square bracket, you have the text string (whatever it is) and then you have the closng curly brace to end the beginning curly brace (what is shown in red. Where I have text string in the example above, is where you put your ^{UNICODE 2588}, as shown in my code.
Here's what it looks like in HTML output:
cynthia
Hi, I have an example of using Unicode 2588 to "fake" a bar chart and another example of using Unixcode 250A to "fake" a dynamically sized box. However, both of those were accomplished in cells in PROC REPORT. You did not specify your destination, so it's hard to predict what will work in every destination, but this worked for me in HTML and should work for RTF and PDF.
ods escapechar='^';
ods text='1 ^{style[color=red font_face="Thorndale AMT" fontsize=16pt] ^{unicode 2588} ^{style[font_size=12pt font_weight=bold] is a red box}}';
ods text= ' ';
ods text='2 ^{style[color=red font_face="Thorndale AMT" fontsize=16pt] ^{unicode 2588}} ^{style[font_size=12pt font_weight=bold] is a} ^{style[color=red]red} box ';
Think of your UNICODE function as being the text string you want to have treated differently (appear in red). So that string, which happens to be a UNICODE function needs to be surrounded by a STYLE function (also invoked with ESCAPECHAR).
The way the style function works is this -- assuming ESCAPECHAR is ^:
'^{style[attr=val attr1=val1]text string}'
I know, the color coding is garish, but, I hope, makes the point that the STYLE function starts and stops with curly braces and the attribute/value pairs are enclosed in square brackets. After the ending square bracket, you have the text string (whatever it is) and then you have the closng curly brace to end the beginning curly brace (what is shown in red. Where I have text string in the example above, is where you put your ^{UNICODE 2588}, as shown in my code.
Here's what it looks like in HTML output:
cynthia
Hi Cynthia,
LOL... that was the one combination I hadn't tried. Just wasn't creative enough. Thank you so much!
The target in this case is about 5000 pdf files.
--Ben
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.