Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Comparision between two tables Post Reply Post New Topic
Author Message
achandana01
Groupie
Groupie
Avatar

Joined: 20 Jul 2011
Online Status: Offline
Posts: 59
Quote achandana01 Replybullet Topic: Comparision between two tables
    Posted: 24 Sep 2011 at 7:20am
Hi,
 
I have two tables like this
 
Account ID DC Date
123456 5/6/2011
567890 6/26/2011
 
Transaction Account ID Post Date
300 123456 5/6/2011
301 123456 5/7/2011
302 123456 5/8/2011
303 567890 6/26/2011
304 567890 6/26/2011
305 567890 6/26/2011
306 567890 7/22/2011
 
I need Count of the accounts whose Postdate > DC Date in other words for Account ID 123456 I need a count when postdate > dc date so the count will be 2 the final result should look like this
123456 2
567890 1
 
I grouped it by account id and used the following formula
if({DCdate},{accountid})< ({postdate},{accountid}) )
then 1
else 0
 
but it is giving me syntax error,donno how to proceed further.If you help me out that will be great.
 
Thanks in advance
chand
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Sep 2011 at 4:10am

assuming you joined the table on accountid...

if {tableDC.DCdate}<{tablePD.PostDate} then 1 else 0
 
group on accountID
palce SUM of formula in group header
suppress footer and details
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.094 seconds.