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

HTML Tags in Window Report

Status
Not open for further replies.

bardboy

Technical User
Jun 27, 2002
7
IL
I am using the crystal report packaged with the release version of vb.net.
I have a field in the database which is a text field with HTML tags
(<strong>, <italic> etc.) I have placed these fields in a report which is
printed from a winform. If I mark the textformat property to crHTMLtext, I
get a query engine error when I try to open the report. When marked as
crStandardText, I get no error but the tags appear in the text (hello
<strong> world </strong>).

Is there a way to express tagged fields in a CR?

Haim Katz

 
Dear Bardboy,

I'm not sure if this will help, but when I do these directly in crystal it requires that the tags be within quotes.

Try creating a formula that includes your field as follows:

&quot; + {htmltextfield} + &quot; and set it's format to be htmltext.

Like I said, not sure if this will help because I don't use the crystal rdc for vb.net or vb for that matter.

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Thank you Rosemary.

I'm new to CR so I appreciate your help. I created a formula with the following text
&quot; + {select_RESEARCH.Title} + &quot;
When I print the report I get the litteral value in the quotes and not the field value.

Do I need to do something else to the formula?

Haim Katz
 
Dear Bardboy,

Okay, I tested this and got the same result. Which I should have realized would happen. I then tried a formula that stripped the text from the string and added it to the current formula and that worked when set as HTML formatting. However, I think your issue is vb.net as I went into my database and entered your information into a field. Ran a report that shows that field.

Without HTML Text formatting it shows:

<strong> Adivsory </strong>

With HTML Text formatting it shows

Advisory with the correct formatting (bold)

I am not sure why you are having problems.

Although, I would check the properties that you can set for a crstandardtext field and see if html format is available.

I searched the knowledge base for vb.net and couldn't find anything. Maybe if you post your question in the integrate forum you may have more luck.

Good Luck,
ro

Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Thanks a lot Rosemary. I take your suggestions, but I guess I'll have to write a work around.

Haim
 
For those interested I received this answer from CR Tech Support
Unfortunately, HTML text interpretation option for the Crystal Reports
control in Visual Studio .NET was not implemented even though the
documentation that was created for this control states that the option
does exist. It also looks like this option was not removed from the code
either.

You may want to try using the RTF text interpretation as this also will
recognize html tags.

Hopefully, we will be able to include this feature in a future patch or
release.


I tried the RTF option, while it didn't crash the report, the text was not displayed as formatted.

haim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top