custom action
Posted: Thu Mar 22, 2012 12:15 pm
I have the following to make a printable report. I need to modify it so it will only pull the current record (This action is pulling the entire query rather than the record in details view [this report link is only viewable on the current record details screen])
Thanks for taking the time to read my post!
- Code: Select all
<?php
class actions_printable_report {
function handle(&$params){
$app =& Dataface_Application::getInstance();
$query =& $app->getQuery();
if ( $query['-table'] != 'GENERAL' ){
return PEAR::raiseError('This action can only be called on the Listing table.');
}
$GENERAL = df_get_records_array('GENERAL', $query);
echo '<html><head>'
.'<title>BWA Report v1.0</title>'
.'<style type="text/css">'
.' th { font-size: 60%;}'
.' td { font-size: 60%;}'
.' img { width:300px;
height:145px;
border-style:ridge}'
.' img.logo { width:75%;
height:100%;
border:none }'
.'</style>'
.'</head>'
.'<body>';
Thanks for taking the time to read my post!