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

Different formatting in a formula 2

Status
Not open for further replies.

nutsmuggler

Technical User
May 22, 2004
3
IT
Hi.
BACKGROUND:
I'm trying to build a bibliographic report.
As you probably know, the way a bibliographic voice is printed depends on the text "type": whather it is a book, an article, a website, ecc.
So I'm building a formula to create a complex string that changes according to the text type.
QUESTION
I need to get different formattings for different voices in the same formula (ex: author in regular, title in italics and so on)
Here is a temporary "test" formula:

If {Text.kind}= "Book" then
formula = {Text.Author}+", "+ {Text.Title}
Else
If {Text.kind}= "Article" then
formula = "test: article"
End If
End If

If the text were a "book" I'like to get the {text.title} field in italics...
I'd like to get an ouput like
Author, title (in italics!!!)
What can I do?
Cheers,
Davide
 
I have never done this, but I have read some where that you can do this with html tags.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Change the paragraph formatting of the text box to html rendering. Then, as dgillz suggests, you can use html tags in your formula.

-Gary
 
Thanks for your tips.
Yet, there must be something wrong, or simply I am lost between windows and dialog boxes.
I cannot find the html rendering option, and the online help doesn't help at all. Th html rendering is neither in the format/paragraph dialog box nor any other boxes... Should I change some setting/option?
Cheers,
Davide
 
Sorry, by text box I meant the formula box, it does not work for text boxes proper.

Right click the formula, then select Paragraph Formatting. From there, set the Text Interpretation to HTML.

Then you can edit your formula to something like this:

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

This is how I do it with Crystal 8.5, but I don't know what version you are using...

-Gary
 
Thanks a million!
That's exactly what I was looking for.
Cheers,
Davide
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top