Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal Report 8.5 sort by formula within a group

Status
Not open for further replies.

KPI2002

Programmer
Jan 2, 2005
4
CA
I am trying to sort records by the result formula wich is percentage of SUMAmout to SumBilled (group sum). Using sortoption in Crystal does not work. Please help
 
Please see thread767-874782 or thread767-879287 for solutions using SQL expessions with topN--which I think is virtually the only solution for this problem.

-LB
 
Hi Ibass,

Thank you for your advise. Some questions:
1.I am using crystal 8.5, I do not see an option to create sql expression field (should I use sql designer?).
2.To select the data in the report I am using stored procedure. will be this a problem?

Thank you very much for your help!
 
I don't know the answers to your questions--perhaps someone else can jump in on that.

The SQL Expression editor should be available in the field explorer if your datasource allows SQL expressions. The reason for using a SQL expression is that it returns hard values that you can then insert summaries on--since you can't do that with formulas containing summaries. So, if you are unable to develop a SQL expression, you can use any other method you have available to return your percentage as a hard value where you can insert summaries and then you will be able to do the topN. I am not familiar with the development of stored procedures, but perhaps you could do the percentage calculation within the stored procedure and then be able to do topN in CR. Not sure, but it's worth a try.

-LB
 
Hi Ibass!

The problem is with stored procedure. For sure, I can not create sql expression from stored procedure. I will try to use tables directly.

Thank you very much again!
 
SQL expression perfectly works with table.
Thank you very much for your help!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top