This topic is locked

Ability to change order of Group Field for report pages?

10/31/2016 3:13:59 PM
ASPRunner.NET General questions
C
churro author

ASPRunner.NET Enterprise 8.1
What I want to do:

Order group fields on a report in a specified order.

For example (referencing this image from the ASPRunner.NET 9.0 manual):

ASPRunner.NET automatically orders it in an ascending order. 2000 then 2004. If it were a text value, it displays it alphabetically. plant L, then plant M, then plant O, then plant Z (using groups I'm personally using).
(Using the example) What if I want to order the years 2003, then 2004, then 2000?

(Or in my case) What if I want to order the groups plant M, then plant L, then plant Z, then plant O?

Because some groups are of more importance than other groups so I/the users want to see that group first, then the next important group going down the list.
What I've tried:

Using SQL query

ORDER BY CASE WHEN plant = 'M' THEN '1'

WHEN plant = 'L' THEN '2'

WHEN plant = 'Z' THEN '3'

WHEN plant = 'O' THEN '4'

ELSE plant END



This works if I want to display the information in a list, but I want to keep the pretty sectioning that reports have with group fields.
Is this possible? Or does anyone have any suggestions?

jadachDevClub member 10/31/2016

What if you created a view in your database using that case statement, then point your report to that view.
I'm surprised your approach doesn't work. That is how I approach these situations (using case statements).

admin 11/1/2016

I would also suggest to create a view in SQL Server on the top of this query and then use this view as a datasource in ASPRunner.NET.