Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: HTML Formatting in a formula Post Reply Post New Topic
Author Message
Central
Groupie
Groupie


Joined: 16 Feb 2011
Online Status: Offline
Posts: 56
Quote Central Replybullet Topic: HTML Formatting in a formula
     Posted: 11 Feb 2013 at 1:57am
Hi,
 
I have the following code. What I am trying to do is bold the first line then new line e.g.
 
The quick brown fox
jumped over the lazy dog
 
Here is my code as below
 
local stringVar sOut;

sOut:="<b>The quick brown fox</b>" + "<br>" + "jumped over the lazy dog.";
sOut
 
I only get The quick brown fox. I have said that the formula can grow etc. text interpretation is HTML text.
 
Help
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Feb 2013 at 4:17am

your formula looks fine and you gotr tyhe two parts with the text interpreataion and the can grow setting.

Is this really the formula or an example that you are really replacing the sample text with fields from your data set?
IP IP Logged
Central
Groupie
Groupie


Joined: 16 Feb 2011
Online Status: Offline
Posts: 56
Quote Central Replybullet Posted: 11 Feb 2013 at 4:25am
This is an example. If the example works then I imagine the fields from my dataset will work....hopefully.
 
I have the formula inside a text box and within the text box I have, can grow. I must be missing something out somewhere. I feel right stupid.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Feb 2013 at 4:31am
you do not need the formula in the text box, it can just be placed on the report by itself.
If you place it inside the text box you also need to set the text box to 'can grow' = true (not just the formula field).
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Feb 2013 at 4:32am
don't worry about getting confused with it. Everyone needs time to learn the nuances of each software. I still learn stuff on it everyday.

Edited by DBlank - 11 Feb 2013 at 4:32am
IP IP Logged
Central
Groupie
Groupie


Joined: 16 Feb 2011
Online Status: Offline
Posts: 56
Quote Central Replybullet Posted: 11 Feb 2013 at 4:41am
Hi,
 
Thanks yet again for the quick reply and solution.
 
I was trying to put more than one formulas in a text box and trying to update each formula. Basically I was getting into a muddle rather than just think about it.
 
Thanks again.
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum