Solved

# sorting by formula field

Posted on 2011-03-09
368 Views
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
Question by:henryk123
• 3
• 3
• 3
• +4

LVL 12

Accepted Solution

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

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

LVL 100

Expert Comment

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

LVL 19

Assisted Solution

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

ID: 35085233
not working,

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

Author Comment

ID: 35085379
- oracle 10
- few more fields direct from database
- no
0

LVL 19

Expert Comment

ID: 35085409
0

Author Comment

ID: 35128364
crystal limitations
0

LVL 10

Expert Comment

ID: 35128585

Q: Is any way sort report by this field ?
0

LVL 34

Expert Comment

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

ID: 35136504
0

LVL 19

Expert Comment

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

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

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

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

Question has a verified solution.

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

### Suggested Solutions

Error when running Crystal Report in BI 2 57
Crystal Reports Server, Unable to remove users 8 42
Mask on Parameter CR2008 28 52
Crystal Report sorting 6 10
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â€¦
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design â€¦
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundrâ€¦