Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Date Formula Post Reply Post New Topic
Author Message
Runner
Newbie
Newbie


Joined: 08 Feb 2013
Online Status: Offline
Posts: 22
Quote Runner Replybullet Topic: Date Formula
     Posted: 17 Feb 2014 at 8:42am
I have a missing timecard report. It runs by payroll end date. I am trying to include the last paid date to determine if the employee needs to be inactivated. If I put the {PaidDate} in the report it list all of the check dates. I have been trying a formula:

if {PaidDate} < {PREndDate} then {PaidDate} else " "

I am receiving the error " " requires a date.

Thank you.
Runner
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 17 Feb 2014 at 9:57am
Hi,

In your formula you are showing Date in If case and String in Else case, because of that it is throwing an error.
You can change your formula to show either Date or string as output.
If {PaidDate} < ToText({PREndDate}) Then {PaidDate} Else " "

Or

If {PaidDate} < {PREndDate} then {PaidDate} else
Currentdate or any Date fields

--Praveen G
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
Runner
Newbie
Newbie


Joined: 08 Feb 2013
Online Status: Offline
Posts: 22
Quote Runner Replybullet Posted: 17 Feb 2014 at 10:45am
Thank you for your help. I used the second formula and the return is the first date in the series. I am looking to return the latest check written.

Runner
IP IP Logged
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