Solved

sorting records based on sum field

Posted on 2008-10-31
6
299 Views
Last Modified: 2012-05-05
Hi Experts,
I'd like sort records by sum field.
My sum filed was created based on subreport.
Formula for sum field in main report:
WhilePrintingRecords;
Shared NumberVar SubValue1;
{@sum backlog}-SubValue1;
, working good.
Now I need sort all records in report base on above sum field in descending order.
I tried create group base on this sum field but I cannot do that. I don't see this field in existing report fields if I try create group.
any ideas ?
henry
0
Comment
Question by:henryk123
6 Comments
 

Expert Comment

by:_MAGIK_
ID: 22854596
Try this

Open the report
Click REPORT --> GROUP SORT EXPERT
Choose the GROUP
IN the dropdown FOR THIS GROUP SORT
Choose ALL
In the BASED ON choose the summary
0
 

Author Comment

by:henryk123
ID: 22854621
I tried this.
I don't see my formula field in list.  I cannot choose. I have no idea why.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 total points
ID: 22860190
You won't be able to sort on that formula.  It is printing pass formula which is after the sorting is done.

Since it has a shared variable it will always be a print time formula.

mlmcc
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 22

Assisted Solution

by:Ido Millet
Ido Millet earned 250 total points
ID: 22861551
Your only option is to prepare the summary value in a command, database view, or SQL Expression, so that it becomes part of the report's raw data set.
0
 
LVL 4

Expert Comment

by:spangdelta
ID: 23451440
I have occasional need to subtotal Part quantities by Customer Order, then display the data in descending order by the subtotal (Answering the question, "What parts are being ordered the most by what customers, sorted by the most-ordered part to the least?".
I create a simple customer order report sorted and subtotalled (Grouped) by Part Number, with a 'Quantity' subtotal.
I then go to Report / Group Sort Expert, set the "For this group sort" box to "Top N", then set the '"Where N is:" box to a number greater than the largest number of subtotal groups the report will ever produce.
0
 
LVL 4

Expert Comment

by:spangdelta
ID: 23451469
Sorry - the phrase
I have occasional need to subtotal Part quantities by Customer Order
should have been written
I have occasional need to subtotal Part quantities across Customer Orders
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question