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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing/Handling HTML characters in Crystal Reports 1

Status
Not open for further replies.

bjgolden80

Programmer
Feb 6, 2003
15
US
I have a web application that stores data in a Sybase Database. The web application uses the Server.HTMLEncode method to encode characters such as "&" to appear as &. However, in the text fields of my crystal reports, these encoded characters are appearing. Is there any way of handling this ?

Thanks!!
 
Can you offer some environment info and some data to go with it?

ex. Crystal 8.5 and the field in the DB appears as: [/code]<b>This is my string field</b>[/code]

I realize this is more simplistic than the html coding you are talking about... it's just an example of what I'd like to see to be able to offer advice.

Thanks,
Thadeus
 
The string is being input to the database as follows:

Server.HTMLEncode("This is the "string", & this is the problem")

In crystal reports I am seeing it as:

'This is the &quot;string&quot;, &amp; this is the problem'

Hope this gives a better idea. The web app is written in ASP, writing to a Sybase Database.

 
You could use formulas to display the field(s). Using the Replace() function, you could handle the above example like this:
[tt]
stringvar t := "This is the &quot;string&quot;, &amp; this is the problem";

t := replace(t, "&amp;","&");
t := replace(t, "&quot;","""");
[/tt]
-dave
 
Well, if you have a version of Crystal (I know 9 allows this) that permits HTML interpretation, this is simply a matter of right-clicking on the field, Format Field -> Paragraph tab -> Text Interpretation drop-down -> HTML Text.

~Thadeus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top