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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting the Total for 2nd Group only...... 1

Status
Not open for further replies.

AuctionLamb

Programmer
Feb 16, 2005
65
ZA
Hi guys!

I have a bit of a problem, here it is, remember I am using CR 8.5:

I have a report that first group by CUSTOMER, then by INVOICENUMBER. The INVOICENUMBER has different PONumbers for that invoice. I just want to add up the amounts of the INVOICENUMBER. For example the report looks like this:

CUSTOMER_1
INV000123 250
PONumber1
PONumber2
PONumber3

CUSTOMER_2
INV000789 750
PONumber8
PONumber6
PONumber7
PONumber5
PONumber4

TOTAL 3210

The main problem is that it adds up all the amounts and not just the "INV000" groups.I need to see 1000 as the TOTAL. The reason for the wrong toal is that it uses the all the PONumbers also to give the total, how do I exclude that so that it only counts the INV numbers?

Help much appreciated!!
 
Use a running total, which can use a formula to decide what to add and what not to add. I'm on Crystal 10 nowadays, but I did a lot of them while using Crystal 8.5.

Right-click on a field and choose Insert to get a choice that includes Running Total.

Running totals allow you to do clever things with grouping and formulas. They also accumulate for each line, hence the name. The disadvantage is that they are working out at the same time as the Crystal report formats the line. You cannot test for their values until after the details have been printed. You can show them in the group footer but not the group header, where they will be zero if you are resetting them for each group.

Summary totals are cruder, but are based directly on the data. This means that they can be shown in the header. They can also be used to sort groups, or to suppress them. Suppress a group if it has less than three members, say. They default to 'Grand Total', but also can be for a group.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top