Page 1 of 1
Using Group Bands and Ordering
Posted: Tue Apr 14, 2015 8:04 am
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
Re: Using Group Bands and Ordering
Posted: Tue Apr 14, 2015 10:07 am
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.
Re: Using Group Bands and Ordering
Posted: Wed Apr 15, 2015 7:24 am
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,
Re: Using Group Bands and Ordering
Posted: Wed Apr 15, 2015 11:46 am
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.
Re: Using Group Bands and Ordering
Posted: Wed Apr 15, 2015 2:04 pm
by allancliff
Thank you so much for your reply, I needed to sort through the interface rather than the query.
Re: Using Group Bands and Ordering
Posted: Thu Apr 16, 2015 6:28 am
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.