Sorting Master Band with Aggregate value in Details Band

Stimulsoft Reports.NET discussion
Post Reply
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Sorting Master Band with Aggregate value in Details Band

Post by Brendan »

Hi,

Is it possible to sort a Master Band based on an aggregate value from its Detail Band?

Short Example:
Two datasources, Customer [Master] and Orders [Detail]
In the Master band for the Customer I display the customers details including their last order date using {MaxDate(DataOrders, Orders.OrderDate)}.

Can I then sort my Customer [Master] Band with this value too in a descending order? So that customers with latest orders will appear at the top.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Sorting Master Band with Aggregate value in Details Band

Post by Jan »

Hello Brendan,

What about following configuration of report:

GroupHeaderBand (old Master Band).
Orders (old Detail Band)

In this case you can sort data as you want.

Thank you.
Brendan
Posts: 309
Joined: Sun Jul 16, 2006 12:42 pm
Location: Ireland

Sorting Master Band with Aggregate value in Details Band

Post by Brendan »

Thanks I will try this to see how it goes.
My Master-Detail layout was a little more complex than the example given just so I could describe the scenario.

An example of the report I was creating was to display the customer on the master band with columns for when their last order was (based on the order dates in the Orders datasource) and the customer details.

Then for the details band I had a height set of Zero and a GroupBand placed above it so that I was just showing the unique products that were ordered and when they were last ordered.

so I was attempting to Sort the Master band based on Latest ordered descending, and then I was grouping the details by product and attempting to sort those by last ordered too.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Sorting Master Band with Aggregate value in Details Band

Post by Edward »

Hi Brendan,

Yes, the task is a bit more complex, please let us know your results.

In case if you have any idea or advice on how to improve such reports, please let us know your thoughts.

Thank you.
Post Reply