LibreBase 5.1 : Multiple Table Subforms

I have the following scenario:

PatientDetails->ConsultDetails (1->N)
ConsultDetails->DispenseDetails (1->M)

PatientDetails

PatientID
PatientName
MedicalAid

ConsultDetails

ConsultID
PatientID
ServiceDate
ReservationNumber

DispenseDetails

DispenseID
ConsultID
TarrifCode
Description
Price

I would like to have a single form that will allow me to add Patient Details, Consult Details as well as Dispense Details. The Consult SubForm (Table) should allow multiple consults to be added. When a specific consult is selected, the corresponding Dispense Details must be shown in the Dispense SubForm (Table).

You’ll likely need 3 levels in your FORM structure with PatientDetails in your main (logical) form, ConsultDetails in a sub-form and your DispenseDetails in a sub-sub-form. FILTERING is built into LO FORMS, so when you select an item from your PatientDetails table, the sub-list automatically shows the relevant records. See this tutorial on FORM-BASED FILTERING. You will need to use the FORM NAVIGATOR to setup your sub-forms.

Thank you for answer and with your guidance I have managed to figure this one out. Another question, is FILTERING built into LO Reports as well. Reason I am asking, is I now want to generate a Report based on current Patient/Consult/Dispense Details. Any guidance on how to do this?