Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Formatting Post Reply Post New Topic
Page  of 2 Next >>
Author Message
Minco
Groupie
Groupie
Avatar

Joined: 28 Nov 2012
Location: United States
Online Status: Offline
Posts: 62
Quote Minco Replybullet Topic: Formatting
    Posted: 26 Aug 2013 at 10:09am
I have 3 text boxes and they all have a question and a field. The field from the database is a check box, so the information in the field is either a 0 or a 1. For example, one text box is;
 
Need a Rebate Program? NO
 
I have a calculated field in the text box that is;
IF checkbox = 1 then "YES" else "NO"
 
But I would like the YES to really stand out by being GREEN and BOLD. How do I accomplish this?
Be kind to those less fortunate.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Aug 2013 at 10:43am
select the field inside the text box
right click on it
select Text Formatting
seelct Font tab
select color formula
add your formula here
IF checkbox = 1 then CrGreen else crblack
selcet Style formula box and add your formula there
IF checkbox = 1 then CrBold else CrRegular
IP IP Logged
Minco
Groupie
Groupie
Avatar

Joined: 28 Nov 2012
Location: United States
Online Status: Offline
Posts: 62
Quote Minco Replybullet Posted: 26 Aug 2013 at 10:53am
Thanks much!
Be kind to those less fortunate.
IP IP Logged
Minco
Groupie
Groupie
Avatar

Joined: 28 Nov 2012
Location: United States
Online Status: Offline
Posts: 62
Quote Minco Replybullet Posted: 26 Aug 2013 at 11:17am
Another formatting question: I have the date fields coming in for the steps but I need to suppress the record if there is nothing there. Since I have 15 steps, do I have to suppress the 15 date fields? How would I do this?
Be kind to those less fortunate.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Aug 2013 at 11:19am

sorry I cannot vsiualize this.

Can you explain it a little more?
IP IP Logged
Minco
Groupie
Groupie
Avatar

Joined: 28 Nov 2012
Location: United States
Online Status: Offline
Posts: 62
Quote Minco Replybullet Posted: 26 Aug 2013 at 11:24am
I have 15 date fields in the table, one is called ENDATE_0 which relates to STE_0, ENDATE_1 which is next to STE_1, etc.....
 
Our database defaults the date 1/1/1753 in to records that do not have any data in it. So when my report is printing an opportunity with 3 steps completed, the 4th date and 5th dates read 1/1/53.
 
I need to either put an "*" substitute or a space " " substitute so I can remove that default date that doesn't even really exist - there's nothing there.
Be kind to those less fortunate.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Aug 2013 at 12:04pm
You will need to do that per item.
Once trick though
on one of the date fields
right click on it and select format field
select the common tab
select the suppress formula
use this exact formula
currentfieldvalue=date(1753,1,1)
 
Now you can use the format painter and apply that format rule to each of your subsequent fields
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Aug 2013 at 12:04pm
if you want to replace the field with a symbol there is a trick for that too.
IP IP Logged
Minco
Groupie
Groupie
Avatar

Joined: 28 Nov 2012
Location: United States
Online Status: Offline
Posts: 62
Quote Minco Replybullet Posted: 27 Aug 2013 at 2:44am
Suppressing formula worked perfectly - just what I needed. But I'd like to know that symbol trick for future reference!
 
Thanks DBlank.... you are a big help.
Be kind to those less fortunate.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Aug 2013 at 5:30am
on any field you can
right click
select format field
select common tab
select display string formula
enter a formula here...remember that you cannot mix result types so you alwasy have to return the same kind of field...for you scenario of returning an "*" for your specifi date value you would use
if currentfieldvalue=date(1753,1,1) then "*" else totext(currentfieldvalue,"MM/dd/yyyy")
 
by using currentfieldvalue you can use the format painter to apply it to multiple different date fields and have it refernec that field specifically. If your formula use da specific data fiel reference you would copy that over as weel so be careful using it. 
IP IP Logged
Page  of 2 Next >>
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.016 seconds.