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

To prompt user to either do top N or bottom N Group Sort

Status
Not open for further replies.
Dec 18, 2006
69
US
Hi all,

I am using Crystal 2008.
I am trying to create a growing/decline sales report. In this report, I want to have a prompt where user will specify either they want to see growing sales information (with customers who have difference in sales going up) or specify if they want to see customers with difference in sales going down. I want to prevent my users from having to go to the report option > group sort expert and manually change the setup.

Any advice is greatly appreciated.

Thank you,
TTL101
 
I think the only way to achieve this would be with 2 sub reports, one that has the groups sorted by Top N and the other by Bottom N.

The parameter would then be used to suppress the version not required. If your report already includes sub reports this approach won't work (sub reports can't contain other sub reports) - in that case I think you are out of luck.

Hope this helps

Cheers
Pete
 
...or perform this in Excel.

My experience in Business Objects et al is great promise for interactive data presentation, but poor performance. The interfaces are designed for beginner to intermediate reporting needs, but fail to preform for complex advanced reporting needs.
 
This approach might not work for all scenarios, but it's worth a shot.

Create a parameter called {?Sort Order}. Add the values 'Ascending' and 'Descending', then set custom values to false.

I don't know where the difference in sales calculation is coming from, but I'm hoping it's in the details section - that's the field you're summing in order to use the group sort expert?

Create a formula field called {@SortSum}, and it should be:

if {?Sort Order} = "Ascending" then {YourDifferenceField}
else
0 - {YourDifferenceField}

Now create a summary field on the {@SortSum} formula and put it in the group footer. Change your group sort so that it's sorting the groups based on that summary field.

Now when you refresh it should prompt you for sort order, and based on the response the groups sort properly. Once you've confirmed it's working you can delete the new summary field.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top