Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Showing Maximum Date in a Field Post Reply Post New Topic
Author Message
cathyganda
Newbie
Newbie


Joined: 16 Apr 2012
Online Status: Offline
Posts: 4
Quote cathyganda Replybullet Topic: Showing Maximum Date in a Field
    Posted: 24 May 2012 at 3:57pm
Hello everyone! :)

Pleeeaaase i need your help.

Crystal Reports 2008

Situation:
If {A.Status} = "Withdrawn"
show maximum date from {B.Date}
where {B.State} = "Withdrawn"

else if {A.Status} = "Declined"
show maximum date from {B.Date}
where {B.State} = "Declined"

how do i make this happen? to show only the maximum date from table B where the state is Withdrawn for a.status Withdrawn and maximum date also from table B where the state is Declined where the a.status is Declined.

Since there might be a lot of times where the application has been withdrawn, or declined, the report gives out rows for each one. it doesn't only pick up the maximum date. hence, duplicates. HUHUUU. i am at wits end :'( Please help meee


IP IP Logged
Gurbs
Senior Member
Senior Member
Avatar

Joined: 16 Feb 2012
Location: Ireland
Online Status: Offline
Posts: 216
Quote Gurbs Replybullet Posted: 24 May 2012 at 10:56pm
You could create a formula like

if {A.Status} = "Withdrawn" and {B.State} = "Withdrawn" then maximum({B.Date})

else if {A.Status} = "Declined" and {B.State} = "Declined" then maximum({B.Date})

Only this is picking up the maximum date of the entire table. So you actually want to create a group on case_ID or whatever, and change the

maximum({B.Date})

part to

maximum({B.Date}, {group_name})
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.031 seconds.