[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Crystal 11: Using a Formula field for sorting in a group

Posted on 2007-07-23
8
Medium Priority
?
5,065 Views
Last Modified: 2012-05-05
I'm using Crystal reports 11.0 and I want my formula field in my group to determine the sorting of the records in the goup.  My formula field returns a percentage of two other report fields on the group.  If the denominator is a zero, then it returns a zero.  I've been told that since I'm retuning a hard coded zero in my formula the Group Sort Expert doesn't show the field in its list.  Is there another way in crystal to recognize the field as a valid sort order field?
0
Comment
Question by:GLlano
8 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 19550102
The group sort expert works only on summary data.  Is this formula your talking about a summary level field or is it detail level?
0
 
LVL 17

Expert Comment

by:MIKE
ID: 19550354
Please post your formula here ....

MIkeV
0
 

Author Comment

by:GLlano
ID: 19551634
Below is my formual.  

IF ({GL_Reports_Shipping_Discounts_By_Doctor;1.LastMonthSales}) = 0 THEN
0
ELSE
100 * (Sum ({GL_Reports_Shipping_Discounts_By_Doctor;1.DiscountGiven}, {GL_Reports_Shipping_Discounts_By_Doctor;1.DoctorID}) / {GL_Reports_Shipping_Discounts_By_Doctor;1.LastMonthSales} )
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

 
LVL 42

Accepted Solution

by:
frodoman earned 2000 total points
ID: 19555683
Is this formula in the details section?  If so you don't want the group sort expert, you want the record sort expert - this will sort by this formula within each group.
0
 

Author Comment

by:GLlano
ID: 19568017
The formula is in a group section.  One of the fields in the formula is summing up values that is located in another group section.  I"m not sure if that is preventing me from sorting using the formula.  Someone suggested using the Group Sort order formula, but when I paste my formula in there it tells me "A constant experssion is required here".

Any help would be appreciated.
0
 
LVL 42

Expert Comment

by:frodoman
ID: 19568117
Are you trying to sort the groups within the report or are you trying to sort the records within each group?  
0
 

Author Comment

by:GLlano
ID: 19570017
I created my percentage field on the procedure and then went it came over to my report I just added it to the group .  In the group, I had it sort by the percentage field ascending and it worked fine.  I wanted to create a solution in Crystal but it didn't work for me.  I need more crystal experience and I need to move on....Thanks for your help!
0
 

Expert Comment

by:Straatie
ID: 23496071
Crystal Report Problem. Ive got a formula in a group, which is calculation a percentage based on other summarized data on the group. I now want to sort the report by showing the Top 10 (for example) based on this formula on the group. I tried using the group sort expert, but the formula in the group is not displayed there. I've looked at the helpfile and it seems that this is not possible through the group sort expert. Can anyone help me please? thanks
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

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…
Screencast - Getting to Know the Pipeline
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month18 days, 17 hours left to enroll

834 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