Solved

sorting by formula field

Posted on 2011-03-09
17
372 Views
Last Modified: 2012-05-11
My formula is crystal 11:

If Sum ({@Backflushes}, {ARINVT.ITEMNO}) = 0 then 0
else Sum ({@Rejects}, {ARINVT.ITEMNO})*1000000/Sum ({@Backflushes}, {ARINVT.ITEMNO})

Is any way sort report by this field ?

{@backflushe} and {@rejects} don't have any sum inside.

thx

h
0
Comment
Question by:henryk123
  • 3
  • 3
  • 3
  • +4
17 Comments
 
LVL 12

Accepted Solution

by:
JayConverse earned 250 total points
ID: 35084961
Sorry, you cannot sort on a formula like that, because it needs to be evaluated after a grouping.
0
 
LVL 10

Expert Comment

by:gavsmith
ID: 35085173
Can't you create a group on that formula field and use group sort to decide order?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35085188
You may be able to sort the group on it

Click REPORT --> GROUP SORT EXPERT
If you can when you select the group and then choose ALL the formula will show in the box.

mlmcc
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 19

Assisted Solution

by:GJParker
GJParker earned 250 total points
ID: 35085223
You won't be able to use that formula to sort records or groups in crystal as this is evaluated at print time at the end of the report build and so is not available when grouping and sorting is done.

The only way I have done this in the past is to calculate my summary values using SQL expressions and then use these values to sort with, although depending on your report / db this may not be possible. let me know the following details and I'll try and let you know if this would be possible

What database are you using ?
show the details behind the rejects and backflush formula
show the SQL for your report
0
 

Author Comment

by:henryk123
ID: 35085233
not working,

In group sort expert I see only regular sum fields, formula is not visible
0
 

Author Comment

by:henryk123
ID: 35085379
- oracle 10
- few more fields direct from database
- no
0
 
LVL 19

Expert Comment

by:GJParker
ID: 35085409
Not suer what your problem is and really don't care but in that case I can't help you and the answer to your original question is NO.
0
 

Author Comment

by:henryk123
ID: 35128364
crystal limitations
0
 
LVL 10

Expert Comment

by:gavsmith
ID: 35128585
GJParker answered your question

Q: Is any way sort report by this field ?
GJParker - "the answer to your original question is NO. "
0
 
LVL 34

Expert Comment

by:James0628
ID: 35136185
It seems like JayConverse deserves at least some of the points, since he said in the first post that it couldn't be done.

 James
0
 
LVL 12

Expert Comment

by:JayConverse
ID: 35136504
Forget about it.  Life it too short to worry about points.
0
 
LVL 19

Expert Comment

by:GJParker
ID: 35136569
Ditto JayConverse remarks , however FWIW ....

The original question is - "Is any way sort report by this field ?" which was correctly answered as "no you can't" by JayConverse

The fact that the reqiuestor did not want to investigate any alternative solutions and chose to give up should not alter the fact that experts had taken the time to read and post correct replies, meaning that the requestor has still learnt something from this post which he has learnt from the experts on here.


0
 
LVL 10

Expert Comment

by:gavsmith
ID: 35136688
My fault, I missed Jay's first comment when I objected, sorry about that. But you are both right (last couple of comments I mean)
0
 
LVL 34

Expert Comment

by:James0628
ID: 35145922
Yeah, it wasn't really about the points.  Just trying to give credit where it's due, and it was, technically, the first correct answer.  If the question is going to be PAQ'd, it made sense to me to include that answer in the solution.

 James
0
 

Expert Comment

by:South Mod
ID: 35178726
All,
 
Following an 'Objection' by James0628 (at http://www.experts-exchange.com/Q_26887174.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Expert.
 
At this point I am going to re-start the auto-close procedure.
 
Thank you,
 
SouthMod
Community Support Moderator
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

789 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