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

Crystal 8.x Varablize Grouping? 1

Status
Not open for further replies.

awholtsIT

IS-IT--Management
Aug 18, 2008
27
US
IS there a way to variablize, or make as a parameter a grouping?

All our reports have the same columns with the same calculations, same parameter (Date Range). We have many reports that are identical, other then how they're grouped. Sales by state, sales by customer, sales by product. These are (3) different reports.

Is there a way to make it (1) report that prompts the user for how they want the data grouped(State, customer or product)?

Thanks,

Andrew
 
Create a param so that user can select, state, customer or product

Create a formula

@group
If {?groupParam} = 'State' then {statefield} else
If {?groupParam} = 'Customer' then {Customerfield} else
{Productfield}

Group on the above formula

Ian
 
Thanks for the reply.

I need a little hand holding with the parameter and formula. Do I need to create a single parameter {GroupParam} that incorporated all 3 fields, or 3 individual parameters that the formula will call? {GroupParam}? If a single, how do I do that?

Thanks again,

Andrew
 
Create one parameter and let have a pick list of State, Customer and Product (3 sepearate values). Set it to not allow custom values, and you should get a combo box to select the sort sequence.

Group by Ian's formula and it should work nicely.

Editor and Publisher of Crystal Clear
 
I finally get it.

Works perfectly as desired.

Many thanks to you both.

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top