cancel
Showing results for 
Search instead for 
Did you mean: 

How do you underline one field within a formula statement?

Former Member
0 Kudos

Hello,

I would like to underline only one field within a string of fields in a report formula.

For example if my formula is:

{Objects.title}", "{Objects.Dated}", "{Objects.Number}

What syntax do I use to underline {Object.title} only, so that the formula returns:

Objects.Title, Object.Date, Objects.Number

Thank you,

CL

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If all you are doing in that formula is concatenating fields, then I suggest you place those fields into a text box along with the commas and spaces and then select just the first field and click on underline.

Former Member
0 Kudos

No, that's not all I'm doing in that formula. That statement is just one of the results in a long formula of conditional statements, so I really do need to know how to underline only one of the fields in the result.

Former Member
0 Kudos

One more note:

I know plenty of workarounds to this problem. I'm not looking for a workaround. I'd just like to know if there is specific syntax you can put in a formula to underline one field or text, or does this syntax just not exist for Crystal Report formulas?

Thanks,

CL

former_member260594
Active Contributor
0 Kudos

There is no specific function or syntax to underline a portion of a formula. I know you said you were aware of many workarounds but I'll throw this one out anyway.

Add the underline HTML tags to the formula;

+ '<u>' + + </u> + Enable the Format option HTML Text Interpretation for that formula. of course the forum interpretted the html tags; & '<u>' & & '</u>' &

Edited by: Graham Cunningham on Jun 18, 2009 9:37 AM

Former Member
0 Kudos

Thanks Graham, I've read about this, and have tried it, but never successfully got it to work. I'm not sure what I'm doing wrong. When I add the tags, Crystal tells me there is an error in my formula, "the remaining text does not appear to be part of the formula" I've changed the text interpretation to HTML. Is there something I'm missing?

Thanks.

Former Member
0 Kudos

{Objects.title} & ", " & "<u>" & {Objects.Dated} & "</u>" & ", " & {Objects.Number};

Place the formula in your report and right click and format field and under the paragraph tab change the text interpretation to HTML Text.

That should change that one field to underlined.

Edited by: Sanjay Kodidine on Jun 18, 2009 11:23 AM

Former Member
0 Kudos

Unfortunately, that doesn't work.

Thanks anyway all.

CL

Former Member
0 Kudos

When you say it doesn't work, in what way does it not work?

Sanjay solution works

Former Member
0 Kudos

It does work.

Write a formula field naming Underline_Test.

For example: "u within angle brackets" & {DBTABLE.DBCOLUMN} & "/u within angle brackets"

Steps to follow:

1. Place the formula field Underline_Test into the report.

2. Then right click the field and select format field then opens Format Editor.

3. Navigate the paragraph, in the Text Interpretation select HTML Text.

4. Then click 'OK'.

Now you will be able to see the field underlined.

Edited by: ananth2009 on Jun 19, 2009 1:44 PM

Edited by: ananth2009 on Jun 19, 2009 1:44 PM

Former Member
0 Kudos

Thanks everyone. I tried it again this morning in my original formula and yes, it worked. I was able to have just one field within the statement underlined! Also, I was able to export it as an .rtf file and the underlining was exported as well.

Many thanks,

CL

Answers (0)