Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Grab Max Date for Multiple entries Post Reply Post New Topic
Author Message
dallasf
Newbie
Newbie
Avatar

Joined: 11 Apr 2013
Online Status: Offline
Posts: 26
Quote dallasf Replybullet Topic: Grab Max Date for Multiple entries
     Posted: 11 Aug 2015 at 8:01pm
Hi,

I have an audit table, which shows day by day changes to transactions.

I'm having an issue trying to find the max (latest) change per transaction for a day.

Using my example of trans date 10/08/2015 and pay component of 'normal' i want to classify the latest (max) date/time edited which should be (11/08/2015 3:19pm)

I need a formula so that it shows if it is the max date/time edited then 'P' if not 'O'.

I will be using this to highlight that row so the user knows what the final transaction was.

I assumed it would be:
If {@PayComp} = {@PayComp} and {q2vRptCCTSTransAudit.date1} = {q2vRptCCTSTransAudit.date1} and {q2vRptCCTSTransAudit.modified_date} = Maximum ({q2vRptCCTSTransAudit.modified_date}) Then "P" else "C"



Any help would be very grateful.

Thank you



Edited by dallasf - 11 Aug 2015 at 8:02pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Aug 2015 at 4:23am
I do not know if this is possible with your current set up. Your Max() is for the entire data set not for a day. Unless you can group on the transdate, or sort by the transdate then you will have to consider doing this outside crystal or via a more complex command.
IP IP Logged
dallasf
Newbie
Newbie
Avatar

Joined: 11 Apr 2013
Online Status: Offline
Posts: 26
Quote dallasf Replybullet Posted: 13 Aug 2015 at 3:51pm
Thanks DBlank

I wrote it into the view instead.
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