Link to home
Start Free TrialLog in
Avatar of rasta2212
rasta2212

asked on

Set Crystal Reports Grouping Level and Order at Run Time

Experts - I have a report in Crystal XI that has multiple grouping levels. I want to provide the users of the report the ability to select what (if any) grouping they want to see at run time.  For example:  I have the following groups currently in the report.

Group 1: Day of Week
Group 2: Field S
Group 3: Field W
Group 4: Field L
Group 5: Half Hour Interval
Group 6: App Name

I want to allow the users to specify which grouping orders they want to see when they run the report. So the first time the may select the grouping order:

App Name / Day of Week / Half Hour Interval

and the second time they may select:

Day of Week / Field W / App Name

I am thinking that it should be possible to set up parameters of like Param 1 through Param 6 for grouping order, and then if they only use Param 1 and Param 2 then they can set the rest to a default value of "None" and the rest of the grouping options would be disregarded.  Is this possible or am I having a pipe dream?
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I believe you have had a pipe dream, but I will let bdreed, frodo, or mlmcc declare it certain.
No, it's definitely possible using parameters and formulas like mlmcc recommended.  Personally, I've created several reports with parameters that let the user decide if they want the report to be generated for viewing in Crystal or Excel (graphical Vs. columns rows based on conditionally suppressed sections), Grouping or Sort Order changes and Details Vs. Aggregate data displayed.

~Kurt
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike McCracken
Mike McCracken

You may also be able to do it straight from code rather than passing parameters and creating complex formulas

Check this sample application in VB6
http://support.businessobjects.com/communityCS/FilesAndUpdates/SCR8_VB_RDC_GroupSort.exe.asp

mlmcc
Avatar of rasta2212

ASKER

mlmcc - that worked great, you rock. I am giving you the 250 pts.

frodo - I'm adding 25 points to the question and giving you an assist for the "gotcha"

Thank you!
rasta2212
Glad i could help

mlmcc