Is there a Crystal Reports formula that takes out RTF formatting embedded in a field

I have a field that has RTF embedded inside of the field all around the text I need. Does Crystal Reports have a tool that removes that formatting by chance? The word "Test" in front of "\par" is what I need to get out of the field. Each field is a bit different.

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\pard\f0\fs17 Test\par
}

Another example below we need the record the words "I wish I was in the land of cotton."

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\pard\f0\fs17 I wish I was in the land of cotton.\par
}
I just wondered if Crystal had such a tool that recognized RTF and could remove it and just show text?
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RDWaibelCommented:
Couple of questions here:
1)  Version of Crystal Reports
2)  What is producing the report?
3)  Do you have the latest patches for Crystal Reports

As I understand it, CR can read and display rtf tags (From SAP Support Site)
In CR, a list of supported RTF tags does not exist.

List of RTF tags Known to Format Correctly in CR
------------------------------------------------
\fonttbl · font table generation
\colortbl · color table generation
\tab · fixed tabs (fixed meaning set on a horizontal line position)
\par · new paragraph...essentially a carriage return or line feed
\qr · paragraph alignment (qr is right aligned, qc is centered, ql is left aligned)
\ul · underline (ulnone is used to switch off underline)
\b · bold (b0 is used to switch off bold)
\fi2880 · indent first line of paragraph (in this example the indent is 2 inches)
\li1440 · left indent all (in this example the indent is 1 inch)
\strike · strikeout font
\emdash or \endash · both produce the smaller "-" dash (en-dash, a dash the width of the letter "n")
\emspace or \enspace · both produce the smaller " " space (en-space, a space the width of the letter "n")
\ldblquote · left double quotation mark (rdblquote produces a right double quotation mark)
\lquote · left single quotation mark (rquote produces a right single quotation mark)
\bullet · bullet mark

List of RTF tags Known to Not Format Correctly in CR
----------------------------------------------------
\pntext\f1\'B7 · bulleted indents (in this example a round bullet is used)
\sub · subscript
\super · superscript
\trowd · tables and any table, row, or cell-related tags
\shad · shadows
\animtext · animated text
\caps · apply capital letters
\uldb · double underline
\uldash · dash underline
\ulth · thick underline
\ulw · wave underline
\chshdng · character shading
\chdate · current date
\bkmrkstart or \bkmarkend · bookmark start or bookmark end
\pict, \wbitmap, etc. · pictures and any picture-related tags
\object · OLE objects and any OLE object-related tags
\do · Drawing objects and any Drawing object-related tags

This might also get you some information, open CR, Press good ole F1, enter 'Text Interpretation'.
0
oliffCommented:
If the field always includes the same RTF, just replace it with nothing?
local stringvar rtftext;

rtftext := "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\pard\f0\fs17 I wish I was in the land of cotton.\par
}";

rtftext:=replace(rtftext,"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}
\viewkind4\uc1\pard\f0\fs17 ","");

rtftext:=replace(rtftext,"\par
}","");

rtftext;

Open in new window

0
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
1)  Version of Crystal Reports  latest version of 2008
2)  What is producing the report? When you say producing do you mean the application? It comes out of an ACT database. It has an OLE DB driver that pulls the data out.
3)  Do you have the latest patches for Crystal Reports Yes we have the latest patches.
See the image below. There is a little more to the records than that. They are not always consistent. How do we drop the RTF formatting embedded in the field.I do not know if this helps.

HistoryDetailsField.png
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

RDWaibelCommented:
I hate to ask this BUT...
Right click the Details field...
Format Field -> Paragraph tab -> Text Interpretation -> RTF text.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
oliffCommented:
RDWaibel, i thought that, but his original query made it sound more like he wanted to check off of the data contained? Now I look at his report, Text Interpretation looks right.
0
mlmccCommented:
There is no function in Crystal to remove the RTF formatting from a text field.  

As suggested above you can set it to RTF interpretation or write your own RTF parser to remove the RTF commands and leave the text.

What do you want the output to be on the report?

mlmcc
0
RUA Volunteer2?Tableau Trainer & Consultant Sales Exec.Author Commented:
I had forgotten that one was in there. That was a training question 3 years ago. I remember it now. I wondered if you could but I thought it was a formula function and could not find it thank you all very much.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.