Using Group Bands and Ordering

Stimulsoft Reports.Silverlight discussion
Locked
allancliff
Posts: 13
Joined: Thu Apr 09, 2015 11:14 am

Using Group Bands and Ordering

Post by allancliff »

I want to group some results by year and month, and show the results in reverse order.

2015 April
2015 March
2015 February etc.

My group clause is {Year}{MonthNumber}{MonthName}
My order clause is YEAR DESC,MONTH DESC

The results order by the first group field, but then revert to ASC ordering for the secondary group.

2015 January
2015 February
2015 March
2015 April
2014 January

I have noticed this in other reports, that secondary orders are not respected in the secondary group name.

Can you confirm this is a bug, thank you.

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

Re: Using Group Bands and Ordering

Post by HighAley »

Hello, Allan.

How many bands do you have? We need more information about the issue to help you.
Please, send us a sample report template with data which reproduce the issue.
It's better to get a report with our demo data.

Thank you.
allancliff
Posts: 13
Joined: Thu Apr 09, 2015 11:14 am

Re: Using Group Bands and Ordering

Post by allancliff »

Please find attached a test I did.
You don't need a database.

I have done a triple ordering on the query, Year DESC, Month DESC and Name ASC
Grouping on {OrderData.OrderYear}{OrderData.OrderMonth}{OrderData.OrderMonthName}

When I run the report you can see only the first one (Year DESC) is respected, Month has changed to ASC and Name is actually random.

Regards,
Attachments
Group Order Test.zip
(5.84 KiB) Downloaded 321 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Using Group Bands and Ordering

Post by HighAley »

Hello.

You don't need all of the Date columns except OrderDate.
You don't need ti use ORDER BY in SQL query.
Our report engine can easily change order of data and grouping.
Please, look at the attached report template.
We use next grouping expression:

Code: Select all

{OrderData.OrderDate.ToString("yyyyMM")}
To show month we use next expression:

Code: Select all

{OrderData.OrderDate.ToString("MMMM yyyy")}
The sort direction of the Group Header should be set to Descending.

Thank you.
Attachments
Report.mrt
(12.12 KiB) Downloaded 415 times
allancliff
Posts: 13
Joined: Thu Apr 09, 2015 11:14 am

Re: Using Group Bands and Ordering

Post by allancliff »

Thank you so much for your reply, I needed to sort through the interface rather than the query.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Using Group Bands and Ordering

Post by HighAley »

Hello.

Yes, you should set sorting order in components where you use the Data Source.
At report rendering data source could change sorting and filtering several times.

Thank you.
Locked