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!

Sort on Running Total Results

Status
Not open for further replies.

piazzab

Instructor
Oct 22, 2001
14
US
I have a client that would like to perform group sorting on the running total invoice amount placed in the Group Footer #1. Is there a way to do group sorting on a running total field? HELP!

The database is a SQL database.

 
Can't sort on running totals.

If you explain what the running total does, there's a good chance that an alternative approach (using a regula total) could be suggested.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
The line items are calculated based on the type from 2 different tables and if they are positive or negative. Then the running total calculates the total from this using a variable. Not sure if a regular total could have been done.
 
You might try to use a Top N report (Report->Top N Sort Group Expert), set the For This Group Sort to Bottom N (or Top N if you want descending) and the Where N to be 500 or so for the invoice amount (should include all of your groups).

-k
 
It sounds like you are creating a Conditional Count.

Here's how to create this using a simple total:

1. Create a formula that returns 1 if the condition is TRUE and 0 otherwise.

2. SUM that formula. Note: don't count -- Sum!

3. Use Report, TopN/Sort Group Expert to sort the groups
based on the Sum.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top