I have a Crystal Report with three (3) groups: Group1 = Location, Group2 = Create Date, Group3 = Case ID. I have a parameter asking the user if they want to display Location (Group1) by selecting Yes or No. The report will suppress Location (Group1) when the parameter = No, but the report continues to sort the results by Location (Group1) first. If my display Location (Group1) parameter = No, I would like the report to first sort by Create Date (Group2). Is there a way to accomplish this?
Create a formula like below. Let's call it "TheFormula".
if {?TheParameter} = "No" then "" else {Table.Location}
Change your group1. It shall group by "TheFormula" instead of "Location".
That is it. Now, if the user says "Yes", the report will be grouped by location. But if the user says "No", the first group will do nothing.