Page 1 of 1

Grouping in a report

Posted: Wed Feb 24, 2021 9:59 pm
by FJCC
I have never used the report wizard in Base but now I am writing up a document on how to use Base and I've had to take the plunge. The attached file shows a little experiment. I made a table called Costs with columns for name, date and amount. I then wrote a query named CostOrdByNameDate that simply orders the whole table by name and date.

Code: Select all

SELECT "Name", "CostDate", "CostAmount" FROM "Costs" ORDER BY "Name", "CostDate"
If I make a report with the report wizard based on that query and choosing to set a Grouping Level on Name, I get the report named CostOrdByNameDate_Query. The output has the order of the unordered table, ignoring the ordering in the query, and grouping only occurs when adjacent rows happen to have the same name. If I make a View from the query, the report has the row order and grouping that I would expect. This is shown in the report CostOrdByNameDate_View. Is it really necessary to make a View to use the Grouping?

I tried making a report directly from the table and using the Sorting tab in the Wizard but that did not work either.

Re: Grouping in a report

Posted: Wed Feb 24, 2021 11:00 pm
by gkick
repWin10LO6472.PNG
Hi @ FJCC,

Even your View based report looks weird. Using the Report Wizard (Grouping) based on the table direct I get the correct result, see image. Are you using OO or LO ?
That's on Australian Date settings using LO 6.4.7.2 on Win10

cheers

nb. I understand there are two different report wizards, the original OO and an optional ORB extension,

Re: Grouping in a report

Posted: Thu Feb 25, 2021 8:16 am
by longi
Hi!
The order in a report (in the old system) is an old bug never solved.
I've got good results changing the data source, from a query to an SQL sentece in the desing view.
It's a pity, but it's the truth. The system needs mantenance.
Here you have several examples of things you can do with reports without ORB:

https://forum.openoffice.org/es/forum/v ... 70&t=11605

Cheers! ;)