?
Solved

CR-Formula-Field with HTML text interpretation

Posted on 2008-02-07
9
Medium Priority
?
3,843 Views
Last Modified: 2013-11-26
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
0
Comment
Question by:mp45
  • 4
  • 4
9 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 20847679
WHere are you looking for the HTML interpretation?
You need to FORMAT the field then click the PARAGRAPH tab.

mlmcc
0
 

Author Comment

by:mp45
ID: 20847767
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
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 20847900
Try using \b

mlmcc
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Author Comment

by:mp45
ID: 20848775
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
0
 

Author Comment

by:mp45
ID: 20848927
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
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 375 total points
ID: 20853644
I don't know.  I have never had a real reason to use RTF interpretation.

I know the rtf and html capability in Crystal is limited.

mlmcc
0
 

Expert Comment

by:simisudevan
ID: 21810209
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
0
 

Author Comment

by:mp45
ID: 21810539
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
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 21818128
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
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Native ability to set a user account password via AD GPO was removed because the passwords can be easily decrypted by any authenticated user in the domain. Microsoft recommends LAPS as a replacement and I have written an article that does something …
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses
Course of the Month5 days, 22 hours left to enroll

588 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question