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

Sort on manually computed group total

Status
Not open for further replies.

jigitty

Programmer
Jun 10, 2003
8
US
Hi,

I am using CR 9.0. In report of Vendors and their Orders I have grouping on Vendor Name:
Details section : Order ID and order amount(using complex formula).
Group 1 footer : Vendor Name and total order amount for that Vendor

Now I want to generate a report which contains only Vendor Name and Total Order Amount in descending order of Total Order Amount.

The total order amount is a manual running total and hence it is not available in the Group/Sort Expert.

Which choices do I have to be able to achieve the above?

Thanks,
Jigitty.
 
Please explain why you are using a Running Total.

If we can find a way to do the same thing with a regular total, the problem would be solved using the TopN/Sort Group option.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Ido, thanks for the reply.

The Order amount field is computed off of complex logic in a sub-report embedded in the main report header. I cannot move this piece of logic to the database end as it would mean hitting the database for every single Order transaction and thereby resulting in poor performance.

Arrays are not an option either as they have a limitation of 1000 elements.

Sincerely,
Cuckie.
 
Ido, thanks for the reply.

The Order amount field is computed off of complex logic in a sub-report embedded in the main report header. I cannot move this piece of logic to the database end as it would mean hitting the database for every single Order transaction and thereby resulting in poor performance.

Arrays are not an option either as they have a limitation of 1000 elements.

Sincerely,
Jigitty.
 
That explains the need for a running total, but it sounds to me like you should be able to implement the subreport as a View in your DBMS and simply add it to your data source (no need for an actual join since it would contain only a single record).

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Actually, the sub-report loads a couple of arrays with currency conversion rates and effective dates. Since the transactions can be in different currencies and have different dates, I need to compute the converted amount in the report for efficiency purposes.

I could potentially create a stored procedure just for this report but I was trying to avoid doing it as it will mean passing parameters to the stored procedure and making the UI unpleasant.

I hope this explains the situation better.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top