Page 1 of 1

PRINTABLE REPORT with Related Records

PostPosted: Fri Jan 27, 2012 7:12 am
by Dalek
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.

Re: PRINTABLE REPORT with Related Records

PostPosted: Fri Jan 27, 2012 10:36 am
by shannah
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');
}

Re: PRINTABLE REPORT with Related Records

PostPosted: Fri Jan 27, 2012 1:53 pm
by Dalek
Thanks for the help, but I don't found the way to use this... I'am quite losted