Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Bold font and non bold font in one formula? Post Reply Post New Topic
Author Message
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Topic: Bold font and non bold font in one formula?
    Posted: 06 Nov 2012 at 8:26am
I have a formula that has an if statement but I want the result be like this:

You chose A: Thank you for your choice.

Is this possible?

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Nov 2012 at 8:34am
you can either use two formulas placed into one text box and contrrol each formula formatting seperatly
or you can use the HTML text interpretation and write your formula to include the tags, something like:
if condition A then "<b>You choose A:<b> Thank you for your choice" else
if condition B then "<b>You choose B:<b> We do not thank you for your choice" else
 
IP IP Logged
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Posted: 06 Nov 2012 at 8:45am
Ahh! Awesome! Worked like a charm!
IP IP Logged
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Posted: 06 Nov 2012 at 8:54am
Well, I guess I can't have my cake and eat it too.

It threw off my replace.

I had a replace({thisfield},"&",Chr(13)) because of a multiple selection field with & separating the answers.


Instead of this:
How many colors do you see?
Red
Green
Blue
Yellow

I get:
How many colors do you see?RedGreenBlueYellow
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Nov 2012 at 9:32am
"<b>how many colors do you see:<b> <br>" + replace({thisfield},"&","<br>")
IP IP Logged
swatts
Groupie
Groupie
Avatar

Joined: 17 Mar 2010
Online Status: Offline
Posts: 83
Quote swatts Replybullet Posted: 06 Nov 2012 at 9:40am
You are the master, thank you!


Edited by swatts - 06 Nov 2012 at 9:40am
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.