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

How to setup groupings for top 25, 50,75 and remaining

Status
Not open for further replies.

makeitwork09

Technical User
Sep 28, 2009
170
US
Hello,

I am using Crystal XI and have been asked to create a report that not only
returns the top 25 loans, but also the top 50, top 75, and the remainder.

The request is to display aggregates (sum and weighted average values) at the following levels:

1st to 25th
26th to 50th
51st to 75th
Remaining

This is based on the top oustanding loan balance.

Would this require a descending sort and a count? If so, how would the
grouping work?

Thanks
 

Someone else will probably come up with a better way, but I'm wondering if you really need grouping or if you can get by with a break after every 25 records - for instance:

Detail formula:

whileprintingrecords;
numbervar x := x + 1;

currencyvar v_loan;
if x mod 26 = 0 then v_loan := 0;

v_loan := v_loan + {YourLoanBalance}


Create a detail B section and put the same formula in it - that will be the subtotal that is displayed (you'd basically be treating details B like a group footer).

Then in the section expert go to details A and put in this suppression formula:

whileprintingrecords;
numbervar x;
x mod 25 <> 0


You'd have to do something similar with a detail formula to get your weighted average. Again, just a thought...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top