Group by a Parameter in Crystal 2008

Jarred Meyer
Jarred Meyer used Ask the Experts™
Is it possible to group by a parameter in Crystal Reports 2008?

Basically created a parameter to pull in Employees. It is setup so the user can select multiple employees or just a few. Problem is I need to group these employees that are being selected in the Parameter. The parameter just doesn't show up in the list in the Group Expert.

Thanks in Advance!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
" ...I need to group these employees ..."
Group them how?

Into a single group?
Are there other employees in the data?  If so what happens to them?
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013
The parameter won't because it is a value.

Try something like

If {EmployeeName} IN {?EmployeeParameter} then

You should be able to group based on that formula
The groups will be
All selected employees
All Others

Sr. Business Intelligence Consultant/Architect
Generally speaking, you would first apply a filter against the parameter in the record selection criteria.  This would limit the report so that only data for the selected employees is returned.  Then, you would simply create a group based on the employee field.

Are you trying to create groups without filtering the data?

Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Jarred MeyerProduction Manager


mlmcc I believe that will work.. Let me give it a try and get back. Thanks for the quick response!
Jarred MeyerProduction Manager


Ended up using the select expert. TOTALLY forgot about that.. I didn't really need to have an "Others" category per say for the unselected employees so the select expert was simpler and kept the report much more organized.

For those searching for this to setup the select expert to, let's say, select specific employees, do the following:

Create a parameter for Employees that will allow you to select multiple employees.
Next go to Report in the menu>Select Expert>Record . Then select the employeename field and set it equal to your parameter... Simple as that..

Thanks again for the help though guys!
Jarred MeyerProduction Manager


Added instructions on how to use the select expert as stated by rhinok's comment.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial