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

Crystal HTML Text Interpretation

Former Member
0 Likes
2,125

I have this information saved in my SQL database field varchar(max):


<span style="text-decoration: underline">This should be underline</span><br />
<br />
<span style="font-weight: bold">This should be bold</span><br />
<br />
<span style="font-style: italic">This should be Italics</span>

When I add the field to Crystal and set the Text Interpretation to HTML. Crystal is ignoring the HTML Tags. The report is printing like this:

This should be underlineThis should be boldThis should be Italics

Its ignoring underline, bold, italic and <br> tag. I know crystal is limited to HTML tag interpration but I thought these tags are between the guidelines.

Am I doing something wrong?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member292966
Active Contributor
0 Likes

Hi,

Right-click your field and go to Format Field. In the Paragraph tab, set the Text Interpretation to HTML Text.

This should do it for you.

Good luck,

Brian

Former Member
0 Likes

Brian,

Thanks for the help but I did that already and notice crystal isn't reading it properly. If I replace

<span style="font-weight bold">

to

<b>

then that works. My thought process is that crystal can read

<span style="font-weight: bold">

Former Member
0 Likes

it can't do style.

This is from the help file

The supported HTML tags are:

html

body

div (causes a paragraph break)

tr (causes only a paragraph break; does not preserve column structure of a table)

span

font

p (causes a paragraph break)

br (causes a paragraph break)

h1 (causes a paragraph break, makes the font bold & twice default size)

h2 (causes a paragraph break, makes the font bold & 1.5 times default size)

h3 (causes a paragraph break, makes the font bold & 9/8 default size)

h4 (causes a paragraph break, makes the font bold)

h5 (causes a paragraph break, makes the font bold & 5/6 default size)

h6 (causes a paragraph break, makes the font bold & 5/8 default size)

center

big (increases font size by 2 points)

small (decreases font size by 2 points if it's 8 points or larger)

b

i

s

strike

u

The supported attributes are:

align

face

size

color

style

font-family

font-size

font-style

font-weight

Former Member
0 Likes

i solve the issue by writting a lot of replace functions. for example

replace(table.fieldname,'<span style="font-weight bold">',"<b>")

Former Member
0 Likes

I'm using Crystal Report 2011