Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Sum field based on Ship date condition Post Reply Post New Topic
Author Message
canonman11
Newbie
Newbie
Avatar

Joined: 10 May 2011
Location: United States
Online Status: Offline
Posts: 10
Quote canonman11 Replybullet Topic: Sum field based on Ship date condition
     Posted: 25 May 2011 at 4:36am
It am trying to Group Summarize my {Price.field} when the {Shipdate.field} has a date in it other wise I want it to ignore that line itemand Sum only the ones that do. Below is what I have attempted to use for the formula. Can anyone please assist me in this.

IF ISNULL({VIEW_OrderDetails.ShippedDate}) then
{VIEW_OrderDetails.Price}

I am getting a blank result and if I use this formula it only gives me the item without a date in the Sum field.

IF NOT ISNULL({VIEW_OrderDetails.ShippedDate}) then
{VIEW_OrderDetails.Price}
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 25 May 2011 at 4:56am
Create a running total formula, reset on group change, and evaluate only when shipped date is not null.

Drag the running total to the group footer.

Edited by Keikoku - 25 May 2011 at 4:56am
IP IP Logged
canonman11
Newbie
Newbie
Avatar

Joined: 10 May 2011
Location: United States
Online Status: Offline
Posts: 10
Quote canonman11 Replybullet Posted: 25 May 2011 at 5:21am
I have tried that but how do evaluate if the ship date is not null?? I put the Shipdate field in the "On change of field" Box under Evaluate but how will it know to ignore the NULL fields?
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 25 May 2011 at 6:40am
Write a formula for the condition.

not isnull(shippedDate)
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 31 May 2011 at 3:59am
you can use isdate(shippedDate) as well
IP IP Logged
Dewald
Groupie
Groupie
Avatar

Joined: 02 Jun 2011
Location: South Africa
Online Status: Offline
Posts: 47
Quote Dewald Replybullet Posted: 02 Jun 2011 at 5:15am
You can also create a formula
IF ISNULL({VIEW_OrderDetails.ShippedDate}) then
0 else {VIEW_OrderDetails.Price}
 
Insert this into the details section then do a sum on this.
 

Dewald Botha
http://www.ITClarity.co.za
IP IP Logged
canonman11
Newbie
Newbie
Avatar

Joined: 10 May 2011
Location: United States
Online Status: Offline
Posts: 10
Quote canonman11 Replybullet Posted: 02 Jun 2011 at 5:35am
That does work fine, My problem is that I had my grouping creating the main issue. Thanks for the help.

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