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

Set text formatting in formula? 3

Status
Not open for further replies.

Davest11

Programmer
Oct 26, 2004
82
US
Is there any way, in Crystal v10, to set the formatting of a text string in a formula? For example, I have a formula that outputs a string. I need the value of that string to be in bold italics in my report. The problem is that I'm not putting that formula directly into the report...it's used in another formula as part of a concatenated paragraph.

What I'd need to do is set the formatting of the string value within the formula where it's created, so that whenever it shows up in the report it's in bold italics. Seems like a long shot to me, but I thought I'd run it by everyone.

Thanks,

-Dave
 
Use Insert->Text and drop the seperate objects into the text object. You can then highlight and format each portion seperately.

An alternative is to use a formula of:

"Hello there, <B><I>I am bold AND Italic</I></B>"

The seond part is now in bold and italic, and could be a formula instead, such as:

"Hello there, <B><I>{@SomeFormula</I></B>"

-k
 
Code:
"<strong>" + "Hello, " + "</strong>" + " today is: " + totext(currentdate,"MM/dd/yyyy");

I could not get SVs sample to work. This is the sample I always refer to.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
SV's solution will work if used in a formula. Then format the formula->format field->paragraph->text interpretation->HTML.

If you then reference the formula in another formula, I think the new formula ALSO needs to be formatted to HTML text.

-LB
 
Yep, forgot to mention that one needs to format the text as html, thanks, lb.

-k
 
Thanks a lot for the information! I cobbled together a workaround yesterday, with three separate formulas dropped into a text box. I didn't realize that you could use HTML tags in formulas...that's great to know.

-Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top