Underline parts of a String in a formular

Hey,
i want to underline some parts of a string in a formula, but i cant find a function who can fix that. Is there a function which i can use to underline parts of a string if the condition is true.
For example: I have the Names “AAA” “BBB” “CCC” and i want to add them to a stringvariable.


stringvar name;
if name = "" then name:={Name}
else name:=", "+{Name}

But i want to underline the Names “AAA” and “CCC” so that the string looks like this “AAA, BBB, CCC”. How can i do that in a crystal formular?
Hopefully someone can help me!!!


jooken :austria: (BOB member since 2009-02-20)

You need to make use of HTML to format a specific part of a string

@ConcatenateNameList
whileprintingrecords;
stringvar namelist;
if {name} in [‘AAA’,‘CCC’] then
namelist := namelist + “”+{name}+""+", " else
namelist := namelist + {name}+", ";

Then format the Display formula by going to Format Field > Text Interpretation > HTML Text

@DisplayNameList
whileprintingrecords;
stringvar namelist;
left(prod,len(namelist)-2)


AnthonyJ :philippines: (BOB member since 2006-06-30)

Thanks a lot Anthony!!! It works pretty fine. I have not heard about the HTML Function in Crystal yet.


jooken :austria: (BOB member since 2009-02-20)