Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subscript OR Superscript in Crystal 11

Status
Not open for further replies.

krishnappan

Programmer
Feb 7, 2008
21
0
0
US
Hi All,

I am fetching some dynamic data from the database, need one of the fields to be a superscript.

Say field1 immediately followed by field2 as superscript.
Like Field1-Field2valueinsuperscript.

I tried using formula, HTML format but it does not work for subscript and superscript. When i give <b>hello</b> then its printed in bold. But when i give <sup>hello<sup> it prints as normal text.

Positioning the text field with small font is not an option as it has to immediately follow the first field.

Any help is gr8ly appreciated.

Thanks!!
 
You can put two Formula Fields into a single Text Object, and then give them different font sizes etc. Does that help?

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I haven't been able to get the HTML tags for superscript to work either. You could uses the following, but I'm not sure other numbers are available for the superscript:

totext({table.number},0,"") + chr(178)//chr(185) = 1, chr(178) = 2, chr(179) = 3, chr(186) = 0

If you have a field for the superscript, you could use:

totext({table.number},0,"")+
(
select {table.superscript}
case 0 : chr(186)
case 1 : chr(185)
)//etc.

-LB
 
is there a table that covers all numbers and character values for super script?

How about sub scripts?
 
I just chucked in a string in a formula as:

//{@Testtext}
'Test <sup> Test </sup> Test <sub> Test </sub>'

Then right click -> Format field -> Paragraph formatting -> Text interpretation -> HTML Text

It didn't throw an error at the input and seemed to format accordingly.

I will have more of a play though.

'J
 
Ah - tried it 1st time in 8.5 and seemed fine but XI doesn't do anything with the tags as you said.

I will test some more.

'J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top