can data sorted by grouping subtotal ?

Stimulsoft Reports.NET discussion
Post Reply
progame
Posts: 46
Joined: Sat Nov 25, 2006 9:12 am
Location: china

can data sorted by grouping subtotal ?

Post by progame »

table
name category value
A1 A 100
A2 A 150
B1 B 200
B2 B 130
.....


report output:
category: B totals:330
B1 200
B2 130
category:A totals:250
A1 150
A2 100

grouping sort by totals and detail sort by value

is it possible?

this feature is often be used.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

can data sorted by grouping subtotal ?

Post by Fabio Pagano »

I too need this sorting feature. Is it already obtainable?
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

can data sorted by grouping subtotal ?

Post by Vital »

Hello,

At this moment this is not possible, but you can use GroupHeaderBand to arrive this. Place one GroupHeaderBand. Set height of it to 0. After then set condition of group to something like this:

Code: Select all

Totals.Sum(GroupHeaderBand1, expression)
Thank you.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

can data sorted by grouping subtotal ?

Post by Fabio Pagano »

Sorry but i've tried this and i have some problems.

This is the normal result:

Image

I want to order by Customer Total, descending.

Adding the group band with the condition as you told above, i've obtained the following result:

Image

Can you help me?

The sample project can be downloaded from here:

http://www.aziwin.it/public/files/OrderByTotal.zip

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

can data sorted by grouping subtotal ?

Post by Edward »

Hi Fabio,

Thank you for the test solution. It helped as always a lot :)

Please see modified report in the attachment.

Thank you.
Attachments
123.Report_modified.mrt
(6.11 KiB) Downloaded 450 times
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

can data sorted by grouping subtotal ?

Post by Fabio Pagano »

Sorry but not solved. In your design the sorting is always on customer name, while i wanted a sort on "Customer total" descending: in my example data i had Total Customer1=60 - Total Customer2=120 - Total Customer3=180, so the descending alphabetical order on "Customer name" gave the impression that the ordering was on "Customer total" descending, but it wasn't so, the ordering was always on "Customer name" descending (because the grouping was on that column).

So i've modified the example data so that we'll have these totals:
Total Customer1=180
Total Customer2=120
Total Customer3=60

so that the ordering on customer name is the opposite of the ordering on customer total.

Applying these data to your "Report_modified.mrt" i have the following result:

Image

Note that the report is always ordered for "Customer name" descending, while i wanted an ordering for "Customer total" descending.

You can download the new solution at:

http://www.aziwin.it/public/files/OrderByTotal_02.zip

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

can data sorted by grouping subtotal ?

Post by Edward »

Hi Fabio.

Yes, you are right.

It seems that this kind of sorting is not available in the current version of the report engine.

Thank you.
User avatar
Fabio Pagano
Posts: 355
Joined: Mon Apr 16, 2007 12:38 pm
Location: Bari (Italy)

can data sorted by grouping subtotal ?

Post by Fabio Pagano »

Ok. Actually as a workaround i'm manually creating a new "data from other data source", with the values grouped and summarized, as suggested in another thread (i would like to put the thread reference but i can't find it anymore).

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

can data sorted by grouping subtotal ?

Post by Edward »

Hi Fabio,

Yes, it is true. Workaround with Data from Other DataSource is actually possible and it does solve the issue!

Thank you, Fabio for this information!

Post Reply