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

Sorting of records based on user selection of paramter

Status
Not open for further replies.

Hypermommy

Programmer
May 23, 2003
75
0
0
US
Hi all,

I'm using Crystal 9. I have a report that has a parameter for the user to select called ?DataToShow. The possible values are:

Type Only
Division Only
Type and Division

I've got various groups set up. If they select type only, then I hide the division group. If they select division only, I hide the type group. If they select both I show both. That all works well.

However, if they select type only, I need to sort by type only. If they select division only, I need to sort by division only. If they select type and division, I need to stort by type within division.

I can see how to set up the sorting at design time. And I've found something that shows me how to set it up at run time, but only for one sort criteria. How can I set up multiple sort criterias at run time?

Thanks all!

-= Hypermommy =-
 
Create a formula that returns a different field based on the parameter. Then, just group on that formula. If group level 2 is sometimes not needed, set that grouping formula to return a constant.

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top