Bug: Classic Report Sort Ignored

 Issue

Despite have an order by clause in you SQL, it is ignored.

This could be because you have sortable switched on.

Apprantly this is due to be fixed in 18.2.

In my case, this was working fine in a sandbox environment and when I copied the page over to another environment, somehow it didn't work. It was only when changing this setting to "No" that my order by worked again.

  

Explanation

"Now the developer adds an ORDER BY clause to the SQL query in Page Designer. The Column Header Sort is still enabled, the user-preference for report sorting still exists. Thus, on report execution, APEX generates an ORDER BY clause (reflecting the Column Header Sort) and applies that to the report SQL - the generated ORDER BY supersedes the report SQL ORDER BY. So have your report really ordered by SQL Query ORDER BY clause, turn Column Header Sorting off for all columns using Page Designer."

Acknowledgement

https://community.oracle.com/tech/developers/discussion/4169338/classic-reports-sorting-in-18-1-is-broken

Comments