Solved

sorting by formula field

Posted on 2011-03-09
17
361 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
Comment Utility
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
Comment Utility
Can't you create a group on that formula field and use group sort to decide order?
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
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

by:GJParker
GJParker earned 250 total points
Comment Utility
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
Comment Utility
not working,

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

Author Comment

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

Expert Comment

by:GJParker
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:henryk123
Comment Utility
crystal limitations
0
 
LVL 10

Expert Comment

by:gavsmith
Comment Utility
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
Comment Utility
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
Comment Utility
Forget about it.  Life it too short to worry about points.
0
 
LVL 19

Expert Comment

by:GJParker
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now