Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Background colour for empty date cell Post Reply Post New Topic
Author Message
chris
Newbie
Newbie


Joined: 02 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote chris Replybullet Topic: Background colour for empty date cell
    Posted: 03 Jun 2011 at 12:21am
Hi all,
 
I have an empty date field which I need to show a background colour. However because the field is empty no colour actually shows when I do the formatting formula.
 
To get round this I have in the past converted the field to text and added a blank space. However the downside is if exported to excel the field needs to be converted back into a date.
 
I've also tried overlaying another field on top using an if isnull show "x" and the colourcoding the text and background colour. The downside is that when exported the additional field shows as an extra column.
 
Is there any perfect solution to this that would show a background colour but would not impact on the excel export ?
 
Many thanks
 
Chris
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 03 Jun 2011 at 4:11am
Put the date field in a text object and set the background color of the text object.  I use this technique frequently to take care of the background color when there is null data.
 
-Dell
IP IP Logged
chris
Newbie
Newbie


Joined: 02 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote chris Replybullet Posted: 09 Jun 2011 at 11:08pm
Thanks for the suggestion, however this also converts the date into a text field when exported to excel. I need to ensure the date field exports as a date.
 
Any other suggestions would be greatly appreciated.
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 10 Jun 2011 at 7:55am

right click

highlight expert

place your conditions and it will hightllight based upon that

sharona
IP IP Logged
chris
Newbie
Newbie


Joined: 02 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote chris Replybullet Posted: 12 Jun 2011 at 11:58pm
Hi,
 
I'm afraid this does not seem to work when there is no data in the cell.
 
I should have said that the background colour needs to show for a cell when it is null AND another field = "abc" for example. I'm using the formatting formula's section as this allows conditional formatting to occur for more complex scenarios..... although they do not show when the cell is null.Thumbs%20Down
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.016 seconds.