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

Remove RTF tags from memo field - help!!

Status
Not open for further replies.

APB1981

Technical User
Jul 10, 2005
83
NO
Hello,

CR XI
MSSQL2000 & ORA 9.2
Windows XP SP2

I want to remove all rtf tags from a memo field. I want to standardise the font in my report. The final result will be a string formula with only the text - no rtf code.

I have tried the following formula - but it probably doesn't cover everything:


(replace
(replace
(replace
(replace
(replace
(replace
(replace
(replace
(replace
(replace
({OBJECT.FULL_DESCRIPTION}
,"\rtf1","")
,"\ansi","")
,"\deff0","")
,"\deftab720","")
,"\fonttbl","")
,"{","")
,"}","")
,"\par","")
,"\fnil","")
,"\froman","")
,"\fscript",""))


Someone out there must have devised a way to overwrite rtf text in crystal. Or atleast overwrite the font and size of the rtf tag.


Here are 2 standard rtf texts - but his could change depending on the text saved by the user:


1.)

{\rtf1\ansi\ansicpg1252\deff0\deflang1044{\fonttbl{\f0\froman\fcharset0 Arial;}{\f1\fswiss\fcharset0 Tahoma;}{\f2\fswiss Tahoma;}}{\colortbl ;\red0\green0\blue0;}\viewkind4\uc1\pard\cf1\f0\fs20 My name is APB 123456\par \par Yes thats right, APB 123456\par \cf0\f1\fs17 \f2 \par }


2.)

{\rtf1\ansi\ansicpg1252\deff0\deflang1044{\fonttbl{\f0\fswiss\fcharset0 Tahoma;}{\f1\fswiss Tahoma;}}\viewkind4\uc1\pard\f0\fs17 Blah blah this is some plain old text .......\par \f1 \par }



APB
 
The tags shouldn't appear in Crystal, have you set the memo field Text Interpretation to be 'RTF' and not 'none'.

Also I don't believe you can change the settings which have been set in the RTF with find replace as these are brought through from source.

HTH

-Steve


"if at first you don't succeed, sky diving is not for you"!!! :eek:)
 
The tags appear in Crystal if you do not select text interpretation: RTF.

The problem is, that the font is specified in the rtf code, so I can not set my own font. Crystal reads the rtf code.

If I leave the text interpretation to none then I see all the code displayed in 1. and 2. exmaples.

All I need is a formula that strips all possible rtf tags code from my memo - and I can now see memo fields in formulas (CR XI)



APB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top