Grouping in a report

Getting your data onto paper - or the web - Discussing the reports features of Base
Post Reply
FJCC
Moderator
Posts: 9248
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Grouping in a report

Post 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.
Attachments
ReportTest.odb
(21.34 KiB) Downloaded 231 times
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
gkick
Posts: 324
Joined: Wed Aug 07, 2019 5:24 pm
Location: Chile

Re: Grouping in a report

Post 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,
Libre Office 6.4.6 on Windows 10 HSQL 2.51 backend
longi
Posts: 110
Joined: Mon Jul 15, 2013 5:04 pm

Re: Grouping in a report

Post 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! ;)
OpenOffice 4.1.5 on Windows 10
LibreOffice 5.1 on Windows 7
LibreOffice 6.0.1 on Windows10
Post Reply