Report macro for Libreoffice Base

Hello everyone, I have a form in Libreoffice Base.In the form I have the main table (Diseases) and the tables subordinate to it (Symptoms, treatment and exams). By making a query in the form, I get the result above.

In other words: I came to the conclusion that a patient has the disease “Streptococcal Pharyngitis”; presents the symptoms of sore throat, fever and malaise. The exams analyzed were: ASLO: positive.
Treatment prescribed was benzathine penicillin, 600,000 units (children weighing less than 27 kg) and 1,200,000 units (children weighing 27 kg or more), IM, single dose. As well as Amoxicillin: 50mg/kg/day, divided into two or three doses, orally, 10 days

All this data is filtered when I make a query fetching the true checkboxes

My goal is to print a report (according to the model in the question) with this information to deliver to the patient.

This is the desired report template:

Does anyone have any idea how I can do this?

Thank you very much in advance!

Hello,

Please see answer (and links) in this post → how to add checkbox in base report

Edit:

So have re-read the question and now confused. You are not clear with the question. Is this about check boxes or about groupings? If about groupings, you have provided nothing in that regard - report data including input to the report.

Edit 2:

So for grouping as you present see this post → Libre Data - multi-level report

It’s about Ratzinger groupings, really lacking information. In the form I have the main table (Diseases) and the tables subordinate to it (Symptoms, treatment and exams). By making a query in the form, I get the result above.
My goal is to print a report (according to the model in the question) with this information to deliver to the patient. However, making a multilevel report is new to me, but your post gave me direction.

Based on the question and noted again in your comment of:

according to the model in the question

a multilevel report is not needed to produce what you display. Your grouping is by record type:

RecType           TypeLiteral   Data

    1             Diseases:    whatever data
    2             Symptoms     whatever data(repeat line for all records)
    3             Treatment    whatever data(repeat line for all records)
    4             Exams        whatever data(repeat line for all records)

Sort based on record type and group by type literal. All records can be in the query input to the report using UNION statements.

An example in the edited section of this answer → LibreOffice base Query empty tables (and in the SQL in the Invoice sample in answer link).

Note that the SQL in link uses back ticks because it is MySQL.

Understood Ratslinger, thank you very much!