• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5069
  • Last Modified:

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

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
GLlano
Asked:
GLlano
1 Solution
 
frodomanCommented:
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
 
MIKESoftware Solutions ConsultantCommented:
Please post your formula here ....

MIkeV
0
 
GLlanoAuthor Commented:
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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
frodomanCommented:
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
 
GLlanoAuthor Commented:
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
 
frodomanCommented:
Are you trying to sort the groups within the report or are you trying to sort the records within each group?  
0
 
GLlanoAuthor Commented:
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
 
StraatieCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Tackle projects and never again get stuck behind a technical roadblock.
Join Now