Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Maximum date with additional conditions Post Reply Post New Topic
Author Message
karollol
Newbie
Newbie


Joined: 06 Sep 2012
Online Status: Offline
Posts: 2
Quote karollol Replybullet Topic: Maximum date with additional conditions
     Posted: 06 Sep 2012 at 11:56pm
Hello All,
 I'm new here and visited you because I'm stuck:)

I need to suppress some lines in my report...

Table contains 4 fields:
1. BARCODE
2. DATE
3. TRANSACTION TYPE (S or A)
4. DATE
5. AMOUNT

I have to suppress lines where transaction is not A and date is smaller that last transaction A date:

so it's something like:

suppress if: (TRANSACTION TYPE is not A) and (DATE < (Maximum(Date) where TRANSACTION TYPE = A)

Obviously I don't know whorking Crystal formula. Is that possible under one suppression condition?

Your help will be appreciated.

Crystal Reports X


Edited by karollol - 06 Sep 2012 at 11:56pm
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 07 Sep 2012 at 2:24am
Hi
 
To eliminate transaction type which is not 'A'
 
-- Go in Report--Selection Formulas--Record
    {TransactionType} = 'A'
 
To get Maximum date where transaction type = 'A'
 
--In seart a group on BARCODE, insert one more group on Transaction Type.  
 
--Go in section Expart --Suppress--Formula editor here you give the following condition .
 
Date <> Maximum({DATE},{Transaction Type})
 
 
 
Thanks,
Sastry
IP IP Logged
karollol
Newbie
Newbie


Joined: 06 Sep 2012
Online Status: Offline
Posts: 2
Quote karollol Replybullet Posted: 07 Sep 2012 at 9:01am
Sorry Guys,
Looks like I made a mistake in my question.

I need that:
suppress if: (TRANSACTION TYPE is A) and (DATE < (Maximum(Date) where TRANSACTION TYPE = A)

so I have to suppress all type A transactions as well as other transactions where date is smaller that the latest A transaction
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