Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Reports - adding table messes up summarized field.

Status
Not open for further replies.

ALC3

Programmer
Sep 23, 2016
2
US
Hi All,

I'm trying to write a report that displays orders and their releases when the due date is within the next 30 days.
Using the Orders table and Releases Table (and grouping both), it looks like this:
(Group Header) Order1
Release 1 - 10 pcs due 09/20/16
Release 2 - 5 pcs due 09/27/16
(Group footer) Total Due: 15 pcs.

Order2
Release 1 - 2 pcs due 09/10/16
Release 2 - 3 pcs due 09/27/16
Total Due: 5 pcs.

That has been no problem. But now I want to show the date of our last shipment. So I link in the shipments table linking it to the order table using the order number field. (Some orders have no shipments while some orders have several shipments) What I'm getting now looks OK, but the Total Due summary is off, like this.

Order1 (has 3 shipments records)
Release 1 - 10 pcs due 09/20/16
Release 2 - 5 pcs due 09/27/16
Total Due: 45 pcs.
Last Ship Date: 09/15/16

Order2 (has one shipment record)
Release 1 - 2 pcs due 09/10/16
Release 2 - 3 pcs due 09/27/16
Total Due: 5 pcs.
Last Ship Date: 09/15/16

Order3 (has no shipment records)
Release 1 - 5 pcs due 09/13/16
Release 2 - 7 pcs due 09/20/16
Total Due: 12 pcs.
Last Ship Date: 09/09/16

The total due summary is including the same release quantity for each shipment record it finds, even though it's not displayed. When there is more than one shipment record, the summarized quantity is off.

I've tried everything I can think of to remedy this, including every join setting Crystal offers, without success. I'd be grateful for any help you can offer.

 
Hi,

One way to handle this:

Since linking to the Shipments table creates a one-to-many link, take the table back out of the main report and get the 'last ship-date' info from a subreport. Call the subreport up from the group footer with your totals, link to it by the 'order number' field. In the subreport itself, show the 'last ship-date' in the sub-report's report footer and supress the rest of the sections.

-Andy
 
AndyMc, thanks! That will work beautifully.
Archie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top