Link to home
Start Free TrialLog in
Avatar of mp45
mp45Flag for Germany

asked on

CR-Formula-Field with HTML text interpretation

Hi,

how can I format a formula field so that I can use html tags?

I have found the following comments in your db (the thread reffered to VS 2003 (CR 9)):
----
04.05.2005 at 07:26AM PDT, ID: 13707522
      
GJParker:
create the formula field on the crystal report and leave it blank, and then add this as the code in your .net Code

crFormulaFieldDefinition.Text = "Replace ('This is how to===place carriage returns===in a text object','===' ,chr(13))"


04.05.2005 at 07:56AM PDT, ID: 13707855      

frodoman:
Another option is to replace the === with <BR> and make sure you've formatted the formula field to use HTML text interpretation.  The advantage to this approach is that it allows you to also use other HTML formatting tags if you want to use bold text, italics, etc.  If you have no interest in ever doing that then stick with chr(13).
----

I can only find "none" and "RTF-Text", but not "html text".

If only RTF-Text is available, what do I have to put it instead of
'Is it an <b>importand</b> or a <i>strange</i> topic?<br>...'

Best wishes and thanks in advance
Michael
Avatar of Mike McCracken
Mike McCracken

WHere are you looking for the HTML interpretation?
You need to FORMAT the field then click the PARAGRAPH tab.

mlmcc
Avatar of mp45

ASKER

yes, right click on formula field - format - paragraph tab - combo 'text interpretation':
it only shows "none" and "RTF text".

I tried "RTF text" with a text containing html tags, but it doesn't work, the text shows e.g. '<b>' instead of the wished  bold text.

Best
Michael
Try using \b

mlmcc
Avatar of mp45

ASKER

I've chosen 'rtf text' and tried "xx \byy",  "xx \b{yy}",  "xx \b(yy)" and  "xx \b yy" to make yy bold. Bold hasn't occured, rather "\b" was shown.

What is the syntax?
... for bold, italic are there even more tags?
... how can I continue without bold e.g. that zz shows normally again ("xx <b>yy</b> zz")?

Is the html text interpretation available in Visual Studio .net 2005?

Michael
Avatar of mp45

ASKER

I've found some hints in another thread.
"{\rtf1 normal \b bold bold \b0 normal \i italic italic \i0 normal.}"
shows the normal, bold and italic text almost as wanted.
 - 1st problem: The first word "normal" was in bold (the format of the field is not bold). So I had to add "\b0" at the beginning:
"{\rtf1 \b0 normal \b bold bold \b0 normal \i italic italic \i0 normal \b bold bold \b0 normal.}"
 - 2nd problem
The text appeared in Arial although the field format is set to Times New Roman.
How can I assure that the chosen font is used in a field with rtf text interpretation?

Is rtf text in cr always that stony?

I use Visual Studio .net 2003 (CR 9).
Is the html text interpretation available in Visual Studio .net 2005?
Which CR version goes with it?

Michael
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
crystal report and text interpretation in html format and <br> Tag
--------------------------------------------------------------------------------

In my crystal report <br> tag is working ,but if we are giving more than one <br> tag it is not taking
eg:
Simi <br><br><br> Sudevan
it will print
Simi
Sdevan
I want more than one line break.please help me
Avatar of mp45

ASKER

I guess it is a good idea to ask your question as a new question because this thread is already finished und thus the experts cannot gain any points for their answers anymore. Hints about the CR version you work with may also be of interest for the experts.

Michael
I just tried it in CR XI.  I also get no blank lines.  To get the blank lines I used

Simi <br> <br> <br>Sudevan

mlmcc