Print Page | Close Window

Formatting

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=19951
Printed Date: 29 Apr 2024 at 1:10am


Topic: Formatting
Posted By: Minco
Subject: Formatting
Date 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.



Replies:
Posted By: DBlank
Date 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


Posted By: Minco
Date Posted: 26 Aug 2013 at 10:53am
Thanks much!

-------------
Be kind to those less fortunate.


Posted By: Minco
Date 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.


Posted By: DBlank
Date Posted: 26 Aug 2013 at 11:19am

sorry I cannot vsiualize this.

Can you explain it a little more?


Posted By: Minco
Date 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.


Posted By: DBlank
Date 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
 


Posted By: DBlank
Date Posted: 26 Aug 2013 at 12:04pm
if you want to replace the field with a symbol there is a trick for that too.


Posted By: Minco
Date 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.


Posted By: DBlank
Date 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. 


Posted By: Minco
Date Posted: 27 Aug 2013 at 6:03am
Thanks so much! I will find that one handy!

-------------
Be kind to those less fortunate.


Posted By: Minco
Date Posted: 27 Aug 2013 at 6:04am
Thanks again DBlank - very helpful

-------------
Be kind to those less fortunate.


Posted By: Minco
Date Posted: 27 Aug 2013 at 11:26am
I tried this out -- works great. thanks much!

-------------
Be kind to those less fortunate.



Print Page | Close Window