LO Base how to print just one row data (in report) at a time

Hello there! I am learning reports and am having some difficulties to figure out how to print just one row of data under a primary ID. I attach the odb file at the end. I found the print button macro and the idea to use a filter table here from one of Ratslinger’s sollutions (Ratslinger, thank you very much :pray: ).
What I achieved is that when I hit the print button, it will print all the rows of data (I have 6 of them in the example odb file, so all together 6 pages). Look at the pic below, how to just print out one corresponding page where VRT_ID = the valuce from VRT_ID field of VRTform? I have searched this site for possible solutions but I did have luck. THANKS!!! Really appreciated. :pray:
(LO 7.1.5.2, Mac OS, HSQLDB)

Base_Print_Report_Example.odb (51.1 KB)

Hello,

You did incorporate most of the necessary portions. The fiter table is key here and is being updated properly with the ID of the item on the form. The Report is based upon a Query.

The problem is that the query never looks at the value in the filter table. To fix, add this to the end of your query:

AND VRT_ID = (Select "Sel_VRT" from "tblVRT_Filter")
1 Like

Oh thank you Ratslinger so much!!! Since it’s almost 1 o’clock at night I have already switched off my computer. I will check it tomorrow and give you feed back ASAP. Though I remember the only query is the one that is the source of the the report. So apparently I will need to add your above code there at the end. Good night and thanks again for such prompt reply!!! :pray::pray::pray:

BTW, add this on using the SQL view. Right click Query name and select Edit in SQL View.

Morning, Ratslinger! That is perfect! Did the trick!!! :pray: :pray: :pray: