PRINTABLE REPORT with Related Records
Archived from the Xataface Users forum.
Dalek — Fri Jan 27, 2012 7:12 am
Hi,
I’ve set up the the printable report as explain in the tutorial ; it works fine. But I would like to know
how could I add datas from related table in it ?
If someone can help, thanks.
shannah — Fri Jan 27, 2012 10:36 am
Dataface_Record has a getRelatedRecordObjects() method that returns related records.
e.g.
- Code: Select all
$invoices = $person->getRelatedRecordObjects('invoices'); foreach ($invoices as $invoice){ echo $invoice->htmlValue('invoice_id').': '. $invoice->htmlValue('total'); }
Dalek — Fri Jan 27, 2012 1:53 pm
Thanks for the help, but I don’t found the way to use this… I’am quite losted