I can't make a report in Base

Good afternoon.

I don’t know how I could make a Base report.

I have tried in many ways, but to no avail.

The problem is that I don’t know how to make the groupings.

Not that I am worried about it as it is at the moment, I would just like to know how it can be done.

The database is Firebird

In the attached database there are four reports:

Informe1
Informe2
Informe3
Informe4

They are different ways to make the report, but I can’t get it the way I intend.

The report should look like the attached file:

Movimientos_por_fecha_y_cuenta.pdf

First page: Document header and detail header.

Second and following pages: Header of the detail.

Greetings and thanks in advance.
Movimientos_por_fecha_y_cuenta.pdf (79,3 KB)
Bancos_prueba_Firebird.odb (600,8 KB)

There is one group above the detail section. You will need a second group for the “tableheader”. This second group should be repeated.
Have a look at the Base Guide for more information:
https://documentation.libreoffice.org/en/english-documentation/
(scroll down and let you show “More …” - last Base Guide is published for LO 7.3, but there has nothing added to Reportbuilder since many years).

But: What you get is Bug 51452 The repeated area of the group will be placed in the header of the page. It isn’t the table header but a separate header of the page, which has been created. You can’t create such a construction at this moment with report builder. So I create my “reports” by macros through a Writer template.

Idea: Set the content, which should be repeated, in a separate group. When report has been executed click on “Edit”. Set cursor into the table and click “Table” → “Merge Table”. Merge the group to “Detail”.
Set properties of the table to repeat the first row.

Thank you very much.

I will try to make the report in a Writer file.

I will look for information on how to do it.

It is something that, so far, I have not seen any examples.

Regards.

I could only offer examples in German. Special constructions for getting invoices.

@EmilianoAGS,
the report builder extension was never fully completed.
the report header is positioned after the page header and that’s a major issue, however most of the issues we come across can be overcome by using workarounds.
.
I have added 2 queries “qReportQuery”, “qReportQuery.sql” and 1 report “rReportQuery” to your db.
the queries are identical but one is saved in direct mode (it retains it’s formatting so it’s easy to read/edit, the other is saved in parsed mode.
we need to use grouping in our report therefore a parsed query or view is required.
.
the workaround is pretty straightforward this code is added to our query:

	case
		when row_number() over(order by "idmov") / 50 = 0 then
			 0
		else
			(row_number() over(order by "idmov") - 50) / 54 + 1
	end "grp",

it creates a field called “grp” with a value between 0 and n.
the first 50 rows fall into group 0, subsequent groups have 54 rows, that’s because the first page of the report contains a report header.
.
it’s important to understand that report header height and size of text in the detail pane dictate the number of rows, feel free to edit the values of 50 and/or 54.
.
firebird has window functions which greatly simplify the coding.
I used the sum() over() function to produce the running balance.
I could and should have used the same function to sum the fields “entradas” and “salidas” but opted for report builder functions in order to show how it’s done.
.
you manually input the value of “idmov” (primary key) and order your tuples accordingly, that’s not good practice because it should always be possible to add data in an arbitrary manner.
.
a report will always process data in a singular predefined order therefore it’s imperative that the data we supply is consistent, my report shows all records from the table “Movimientos” subject to filtration, it’s probably not a good idea to show transactional info in the report header.
Bancos_prueba_fb.odb (608.9 KB)