function forena_report in Forena Reports 7.2
Same name and namespace in other branches
- 8 forena.module \forena_report()
- 6.2 forena.module \forena_report()
- 6 forena.module \forena_report()
- 7.5 forena.module \forena_report()
- 7 forena.module \forena_report()
- 7.3 forena.module \forena_report()
- 7.4 forena.module \forena_report()
Load and render a report based on a drupal path. In this function the arglist is used to get the full path to the report.
Return value
unknown
1 string reference to 'forena_report'
- forena_menu in ./
forena.module - Implementation of hook_menu.
File
- ./
forena.module, line 507
Code
function forena_report($name_in, $parms = array(), $print = TRUE) {
require_once 'forena.common.inc';
$desc = forena_report_desc($name_in);
if (!$desc['exists']) {
drupal_not_found();
exit;
}
$report_name = $desc['name'];
// Load dataTable plugin if possible.
forena_include_data_tables();
$output = FrxReportGenerator::instance()
->report($name_in, $parms, $print);
$m_path = drupal_get_path('module', 'forena');
drupal_add_js($m_path . '/forena.js');
$forena_js = array();
$forena_js['form'] = preg_replace('/[^\\w\\-]+/u', '_', FrxReportGenerator::instance()->form);
$forena_js['report'] = preg_replace('/[^\\w\\-]+/u', '_', $name_in);
drupal_add_js(array(
'forena' => $forena_js,
), 'setting');
return $output;
}