Yes, I am applying a sort in the query panel. I am overwriting the SQL generated by the query panel to use my ORDER BY on a column. But this is not working.
If I apply the sort for the first time, it's working. If I try to modify the dataprovider, I am not getting the correct report. But in that view data option, I am getting the correct result. May be you can try to purge and refresh the data provider for the correct result, i guess.
That's how it works. The sort is honored only on the initial creation of the default report. After that, control has been turned over to the report block. You won't ever get it to sort again from the query panel.
Sorts in the query panel are useless. Sorting should be done on the report.
Yes, even if I use ORDER BY in the SQL query, it is not working. I had to use sorting in the report somehow.
I also had to change the query to use GROUP BY stuff to get the desired result.
OK, now the truth comes out. If you had to modify the query to add "sum" on a measure and a Group By clause, then your universe is not built correctly.
Measures should have SQL aggregation on them in the Select portion of the object. eg. Sum(table.quantity) or Count(table.Order_number)
Without it you are simply dumping records to BO and having it do all the work.
The projection setting on the advanced tab tells BO how to deal with the data at the report level. That will be set to Sum 99% of the time. If you set your aggregation on the SQL, the other one will work by itself.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.