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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reg: SORT ORDER in Crystal Reports 2

Status
Not open for further replies.

chandrasai

Programmer
Feb 6, 2007
3
US
The group sort order expert does not seem to have a Formula Workshop functionality. I am looking to prompt the user for which summary to use for the group sort order. Is there a way to condition the sort order? Or can it only be defined in the report?


I am using Crystal Reports XI release 2
 
Group sort is based on inserted summaries, so you can create a formula like the following:

if {?sortby} = "Amt" then
{table.amt} else
if {?sortby} = "Discount" then
{table.discount} else 0

Place this in the detail section and insert a sum on it. This formula will now be able for a group sort. If you have multiple datatypes, you will have to have separate formulas with inserted summaries, both used in the group sort area. Only one will have an impact on the group sort based on the selected parameter option.

-LB
 
Thanks a lot for your answer. It did work out for me very well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top