PRINTABLE REPORT with Related Records

A place for users and developers of the Xataface to discuss and receive support.

PRINTABLE REPORT with Related Records

Postby 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.
Dalek
 
Posts: 2
Joined: Fri Jan 27, 2012 6:58 am

Re: PRINTABLE REPORT with Related Records

Postby 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');
}
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: PRINTABLE REPORT with Related Records

Postby 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
Dalek
 
Posts: 2
Joined: Fri Jan 27, 2012 6:58 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 15 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved