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!

changing style of just a word 3

Status
Not open for further replies.
Oct 15, 2003
145
US
I want to change the font to bolditalic every time the word "footnote" appears in my report. I have the following in the font formatting formula:

if 'Footnote:' in {Text} then
crBolditalic

This works - except it changes the entire line. How do I change just the word Footnote?



 
If your field is < 254 characters you could use this formula:
replace({Table.field},&quot;footnote&quot;,&quot;<b><i>footnote</i></b>&quot;)

... then place the formula field on the report, and format it as &quot;HTML Text&quot; (under 'Paragraph Formatting').

-dave
 
I think this is possible. When you say {Text}, is this a database field? Also, where is this field in the report?
 
Actually you can do it!

Vidru is correct.... Vidru that's brilliant... well done!

Rob

Stay Blue, Bob. x
 
Vidru - thank you for your reply. I tried your idea - but I don't see where you can change it to HTML Text is. I looked at the paragraph tab under format - and didn't see anything of the like.

I'm using Crystal Reports for VB.net - does that make a difference.

GMcNamara - When I say {Text} - yes it's a database field and it's under details on my report.

Thanks everyone for replying.
 
WyldGynjer,
I'm not sure if it's available in CR for VB.Net, but on the Paragraph Formatting tab, the thing to change would be 'Text Interpretation'.

Bobber,
Thanks for the love....

-dave
 
That's a good point.... when I go to use crystal.net and right click the field :

format -> paragraph -> text interpretation

the only options I get are 'none' or 'RTF format', whereas in Crystal Reports 9 proper, there is an additional option for HTML.

Rob

Stay Blue, Bob. x
 
The help within .NET is as follows :


Text interpretation
Use this list to select the type of pre-formatted data (string or memo fields only) or text you are inserting in a field. Crystal Reports extracts information about the font, size, style, color, and paragraph and displays the data or text with the specified attributes.
Your choices are:

&quot;none&quot; to interpret the string or memo field or imported text as if it contains plain text
&quot;RTF Text&quot; to interpret the string or memo field or imported text as if it contains Rich Text Format data
&quot;HTML Text&quot; to interpret the string or memo field or imported text as if it contains HTML data.


But I don't get the &quot;HTML text&quot; option!

Rob



Stay Blue, Bob. x
 
It should work with RTF formatting as well.

-dave
 
I'm trying to do it with the RTF Formatting

I keep getting an error message saying that it's expecting a number.

I've tried:

if 'Footnote:' in {table.Text} then
replace({table.Text},'Footnote:','<b><i>Footnote:</i></b>')

I've tried it with and without the if statement, I've tried it with single and double quotes...i don't understand the error message:

&quot;The Formula result must be a number.&quot;

Bobber - did you get this to work?
 
Thanks for all your help. I acutally talked with my project manager and we have decided to not include anything else on the line - so it appears to the user - that only the word Footnote: is changed.

Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top