Link to home
Start Free TrialLog in
Avatar of Dave Stone
Dave StoneFlag for United States of America

asked on

Crystal Reports - Date Field Font Color

Hello,
      I have a report that shows me inventory transactions. I have 2 dates that I am looking at. One being when the product went into inventory and the other is when I shipped the product. I have the date field for when it went into inventory use a red font if this date is less than the ship date. This works fine. However, I would like the date that it went into inventory to be a red font only if it went into inventory 6 months before the ship date. How would I do that? This would help me see the product that sits in inventory for 6 months before being shipped.

Thank you
Avatar of Ido Millet
Ido Millet
Flag of United States of America image

Set the font color expression to something like:
IF DateDiff('m', {InDate}, {OutDate}) > 6 THEN crRed ELSE crBlack

Open in new window

or
IF {OutDate} - {InDate} > 183 THEN crRed ELSE crBlack

Open in new window

Avatar of Dave Stone

ASKER

Perfect, can I also make it bold using the same criteria?
ASKER CERTIFIED SOLUTION
Avatar of Ido Millet
Ido Millet
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Awesome. Thank you.