cancel
Showing results for 
Search instead for 
Did you mean: 

Problem while converting rtf text to plain text

Former Member
0 Kudos

I have rtf text as

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 HelveticaNeueLT Com 45 Lt;}}

{\colortbl ;\red125\green3\blue3;\red255\green255\blue0;}

\viewkind4\uc1\pard\cf1\f0\fs20 testing\highlight2 remarks\highlight0\par

}

It should display as "testing remarks" where "remarks" word is highlighted with yellow color. It is not dispalying highlighted color.

Can anyone please help me out?

Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The rtf interpretor bundled with Crystal is very old, so it might not recognise the Highlight command.

I have just tested your RTF string in Word and it highlights OK, but in CR10 and CR2008 it does not highlight.

Ian

Former Member
0 Kudos

I am using CR 2008 SP3. In which version does that RTF will be converted correctly.

Former Member
0 Kudos

My point is - I dont think Crystal can has it does not recognise the RTF Highlight command.

Ian

Former Member
0 Kudos

is there any other way to do this?

Former Member
0 Kudos

Not that I am aware of.

There might be some third party products, but not seen any which improves RTF interpretation for Crystal.

Ian

Former Member
0 Kudos

Thank you so much.. I will search if any third party products exist.

Former Member
0 Kudos

Split the field testing remarks into two fields, or you could try something like formula field:

If {filed} like "*remarks" then "remarks"

Carefully place this formula field on top of the field containing testing remarks exactly over remarks and fill with color of your choice. It won't print if remarks is not there.

Debi

Edited by: Debi Herbert on May 19, 2011 1:45 PM

Former Member
0 Kudos

It may not be always remark text. It may be a long text and i middle there may be one or more words highlighted. Did you mean in datbase i should create another field to save highlighted text and create a formuls like you said above?

Former Member
0 Kudos

now i converted my richtextbox text to HTML text and i got the below HTML text,

"<div><span style="color:#7d0303"><span style="background-color:window"><span style="font:normal normal normal 8.5pt/normal HelveticaNeueLT Com 45 Lt"><p style="text-align:Left">t</span><span style="background-color:window">e</span><span style="background-color:window">s</span><span style="background-color:window">t</span><span style="background-color:window">i</span><span style="background-color:window">n</span><span style="background-color:window">g</span><span style="background-color:window"> </span><span style="background-color:yellow">remarks </span><span style="background-color:window">b</span><span style="background-color:window">y</span><span style="background-color:window"> </span><span style="background-color:window">M</span><span style="background-color:yellow">SA</span></span></span></p></div>"

I placed this field in crystal reprots and given text interpretation as "HTML text". THen also i am not able to dispaly the text properly with the highlight color.

Edited by: sweish on May 20, 2011 1:11 PM