cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Superscripts

Former Member
0 Likes
1,919

I am trying to add a superscript to a field, I have tried both RTF and HTML formatting but it does not appear to work as it looks like Crystal does not support the relevant HTLM tags

HTML

'<p>'&{psp_GetPortfolioName;1.PortfolioName}&'<sup>1</sup></p>'

RTF

'{\rtf1\ansi\deff0 {\fonttbl {\f0 arial;}}  {\pard\fs22'&{psp_GetPortfolioName;1.PortfolioName}&'\super 1\par}'

Both work when viewed either in a browser or word pad.

Are therer any other supported tags which will allow me to display superscripts in Crystal. If not is there any other way of doing this. I do not really want to add a small text box with conditional suppression, but if thats the only solution then I will.

The down side of this is the superscript is static and will float around irrespective of how long field text is. Where as a html or RTF tag would place superscript at end of actual text.

Ian

View Entire Topic
abhilash_kumar
Active Contributor
0 Likes

Hi Ian,

None of the HTML or RTF subscript/superscript tags are supported by Crystal Reports unfortunately.

An Enhancement Request has already been posted at the Ideas Place.

A workaround other than the Text box one is to use the chrw() function. It accepts an ASCII value and alongwith with a font like 'Arial Unicode MS', it converts it to superscript/subscript.

For e.g: Let's say you want to write CO2. The formula would be:

"CO"&chrw(8322).

After applying the Arial Unicode font to this field, it shows 2 as the Subscript.

You can search for the ASCII chart on google.

-Abhilash