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

Group Sort needed

Status
Not open for further replies.
Jun 26, 2002
77
US
OK...Here is a complex situation. I have a report with results as follows:

Group1 - PatientID
Group@ - TicketID

A Patient can have multiple tickets. A record stores the payment made with the balance. So again there can be multiple payments made to a balance. When a record is stored, the balance for each record will reflect the last balance on hand.

What our clients wants to see is the total balance that a client owes sorted with highest balances first. I can do a running total to add the balance on change of ticketID, but then I cannot sort.

This is what the data might look like.

Client ID 124
Ticket ID ABC
Payment Balance
25.00 1000.00
30.00 1000.00
10.00 1000.00
Ticket ID DEF
25.00 150.00
50.00 150.00

What our client wants to see is Balance 1150.00 and use that balance to sort the client ID by.

Version = Crystal Report XIR2
Thank you in advance
 
If the payment field is causing the balance to repeat, remove the table containing it. Then you could insert a sum on the balance field at the client level, do a group sort of client ID based on sum of balance, and insert a subreport at the ticket group level that shows the payments against each balance.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top