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

Groupp select / report totals

Status
Not open for further replies.

mrmookster

Programmer
Feb 8, 2005
27
GB
I'm sure there is an easy answer to this but I can't figure it out.

Crystal v8.5, SQL Server 2000.

I have a report based on a group select
Sum ({@61-90}, {_SP_CR0009;1.CLIENT_CODE}) = 0 and
Sum ({@91-120}, {_SP_CR0009;1.CLIENT_CODE}) = 0 and
Sum ({@over 120}, {_SP_CR0009;1.CLIENT_CODE}) = 0

basically an aged debt report. Which is fine it does what I expect.

But the report totals total all the records not just those restricted by the group select? How can I get totals for the records based on the same criteria as the group select?

Thanks
 
I'm afraid that Crystal doesn't truly filter the rows, so you'll need to manually do so.

So in the group header create a formula of:

whileprintingrecords;
numbervar T61-90:=0;
numbervar T91-120:=0;
numbervar T120:=0;

Details:
whileprintingrecords;
numbervar T61-90:=T61-90+{@61-90};
numbervar T91-120:=T91-120+{@91-120};
numbervar T120:=T120+{@over 120);


Group Footer display area:
whileprintingrecords;
numbervar T61-90

So reference each variable in it's own formula.

-k
 
You need to use running totals. Not sure what you are adding, but you just need to select that amount, sum, evaluate for each record, reset never. You don't need to use any special criteria unless you are also using some sort of section suppression. Place the running total in the report footer section.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top