Sort Group by Sum

Stimulsoft Reports.WEB discussion
Post Reply
Manuel
Posts: 3
Joined: Thu Jun 15, 2017 1:40 pm

Sort Group by Sum

Post by Manuel »

Hello,

I try to sort a group but not by the grouping expression. I need to sort descend by sum of the datafield ordervolume.

Sampe Result:

User Sum of ordervolume
G 90.000
D 80.000
J 70.000
...

Summaryexpression, Type and Sortdirection did not work. The grouping gets lost. Perhaps a bug? I use Web 2015.2

Thanks for any help!

Manuel
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Sort Group by Sum

Post by HighAley »

Hello, Manuel.

Please, try our latest build if you still get the issue, please, send us your report template with sample data for analysis.

Thank you.
Manuel
Posts: 3
Joined: Thu Jun 15, 2017 1:40 pm

Re: Sort Group by Sum

Post by Manuel »

Hello HighAley,

I've send you an PM because the report includes non public data...

Thank you!
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Sort Group by Sum

Post by HighAley »

Hello.

Sorry, the data for your report is not available and we can't reproduce the issue.
Could you try our latest build? maybe there was an improvement of this issue.
If you still need our help, please, send us data for your report.

Thank you.
Manuel
Posts: 3
Joined: Thu Jun 15, 2017 1:40 pm

Re: Sort Group by Sum

Post by Manuel »

Hello,

we tried the latest build but it's still not working. Do you have an example with grouping and sorting by totals?

Thank you!

Manuel
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Sort Group by Sum

Post by Alex K. »

Hello,

Please check the sample report in the attachment.

Thank you.
Attachments
Capture.PNG
Capture.PNG (54.41 KiB) Viewed 4168 times
03. Top Sales.mrt
(47 KiB) Downloaded 387 times
JHenn
Posts: 20
Joined: Fri Jun 01, 2018 9:23 pm

Re: Sort Group by Sum

Post by JHenn »

This is still problematic, in the web version at least as of Version 2018.2.2 from 28 April 2018, and the desktop version as of 2018.2.2.

I have two groups, Group 3 and Group 4. For each, I want to show the sum of CPT counts in descending order.

The GroupHeaders - on Group and on CPT Code - work fine, and I can show the sums of the counts. But when I try to order the values in GroupHeader2 by the descending Sum value, it appears that that order overrides my primary grouping value. Rather than getting one grouping each for Group 3 and Group 4, I get multiple groupings of each, shown in the order of the overall CPT sums.

You should be able to replicate this by creating a report with two GroupHeader values, then trying to order the second grouping by a summary value. The primary grouping will no longer be kept together.

GroupHeader1:
Image

GroupHeader2, with sort on summed value:
Image

A small capture of the output. As you can see, the GroupHeader1 values are no longer being kept together.
Image
Judy Hennessey / PrecisionBI
JHenn
Posts: 20
Joined: Fri Jun 01, 2018 9:23 pm

Re: Sort Group by Sum

Post by JHenn »

I created a variant of the earlier Stimulsoft example, but with a new top GroupHeader for {Products.Suppliers.Country} and with the detail suppressed, so you can see the pattern. You will see that the top grouping (Country) is broken into smaller sections, in order to respect the Sum ordering of the second GroupHeader. The sums appear to be correct for each country / category combination, but the country order has been lost. (If you remove the summary aggregation from the second grouping, then the first country is Australia, and the countries are kept together.)
Image

03_TopSales_jh.mrt
Judy Hennessey / PrecisionBI
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: Sort Group by Sum

Post by Lech Kulikowski »

Hello

We need some additional time to investigate the issue.

Thank you.
Post Reply