Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Count SubTotals Post Reply Post New Topic
Author Message
dhazen
Newbie
Newbie


Joined: 11 May 2010
Online Status: Offline
Posts: 7
Quote dhazen Replybullet Topic: Count SubTotals
     Posted: 07 Jul 2010 at 1:03pm
I'm trying to count the number of late orders (not items) for a report.
The data looks as follows:
Bill of Lad  Order  Item   Transport  Late 
123           1         1         10            1   (yes)
124           1         2         10            0   (no)    (Entire order should be late)
-------------------------------------------------------
125           2         1         11            0  
126           3         1         12            0 
 
 
Both items shipped on the same transport.  Since Item# 1 is late and item# 2 is not the entire order should be counted as "late". 
I have a Count function in the Grand Totals to count unique orders so the order count above would be "3" and number of late orders SHOULD be "1", but I don't know how to accomplish this.
 
Please help.


Edited by dhazen - 07 Jul 2010 at 1:04pm
Deb
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 08 Jul 2010 at 3:16am
either a running total, which is not my forte, or  variable, and you can put the logic in the group footer to increment it as needed...at least that is what I would do.  Since I'll be honest, I don't quite understand the logic of being late, but it seems if any part is late, then it all late, I would do a sum of the late field in the group footer and if it greater than 0, I would increment the variable counter.  Display the variable as appropriate and don't forget to reset it to 0 in the appropriate group header (if needed)
 
 
HTH
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 08 Jul 2010 at 3:23am

If you use a Running Total...

Name=LateCount
Field to SUmmarize=Order#field
Typeof Summary=DistinctCOunt
Evaluate=use a formula
table.Late=1
Reset=Never
Place in Report footer


Edited by DBlank - 08 Jul 2010 at 3:23am
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