I'm using a parent-child relationship to create comments for a record (as I described here.).
One issue I've run into with this set up is printing. When printing the parent, the children are not printed. What I'm going to do is create a new print template for parenttable_templateDVP.html that lays the child records out below the parent (including photos, which is a field in my comments), but I'm at a loss as to how to reliably call the children records for a particular parent. I know it's a MySQL query but after looking through the code generated by AppGini I'm not sure what I should use, as the queries are rather convoluted to my eyes.
Can anyone help me with this? What I'd like is a detail view of the parent and table view of the children below it if possible.
Print child records with parent
Re: Print child records with parent
I'm planning to add this as an option in future releases .. But didn't work on the code yet unfortunately.

- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
- Need personalized consulting on your specific app and customizations? Book an online call with me here.
Re: Print child records with parent
That would be great. Can you give me some info on how the child is associated with the parent? Perhaps I could work it out if I knew a little more how it worked. Thanks for your help, Ahmad!
Re: Print child records with parent
The lookup field in the child table stores the primary key value of the parent record. For example, if you have an "orders" table and a child "order_items" table that stores the items of each order, the order_items table would have a lookup field storing the order ID value to link items to a specific order.

- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
- Need personalized consulting on your specific app and customizations? Book an online call with me here.
-
- Posts: 26
- Joined: 2014-05-01 12:57
Re: Print child records with parent
Yes, this would be an extremely useful function for reporting. I have many customers that ask for similar type of reports. If there are active records under a parent table/record - to have the children records printed directed below it. Almost like a Crystal Reports layout.
-
- Posts: 11
- Joined: 2013-08-07 17:15
Re: Print child records with parent
has anyone managed a quick fix yet to this?
-
- Posts: 26
- Joined: 2014-05-01 12:57
Re: Print child records with parent
Ultimately, the process for this is not that difficult. It is just a matter of preference and display.
Method 1:
Use SelectedID to run a while loop for records in another table based on SelectedID. Echo the results in table form and siplay the data from the fields you are looking for.
Method 2:
Use the Iframe (Secondary Table View method) to display the child tables records post filter using the Parent tables SelectedID.
Either method should work, but depending on how good with running queries or using the filtered results one method may be easier than the other for you.
It would be nice however if there was a GUI option for this. In AppGiini while building the application. There should be a second option next to the Linked Child tables box that asks if you want the child records to be displayed in a secondary table below the parent tables selected record.
Method 1:
Use SelectedID to run a while loop for records in another table based on SelectedID. Echo the results in table form and siplay the data from the fields you are looking for.
Method 2:
Use the Iframe (Secondary Table View method) to display the child tables records post filter using the Parent tables SelectedID.
Either method should work, but depending on how good with running queries or using the filtered results one method may be easier than the other for you.
It would be nice however if there was a GUI option for this. In AppGiini while building the application. There should be a second option next to the Linked Child tables box that asks if you want the child records to be displayed in a secondary table below the parent tables selected record.
Re: Print child records with parent
Do you have an example? I would like to print child records with parent.
Thank you
Thank you