You are here

function forena_report in Forena Reports 6.2

Same name and namespace in other branches
  1. 8 forena.module \forena_report()
  2. 6 forena.module \forena_report()
  3. 7.5 forena.module \forena_report()
  4. 7 forena.module \forena_report()
  5. 7.2 forena.module \forena_report()
  6. 7.3 forena.module \forena_report()
  7. 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 571

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'];
  $output = FrxReportGenerator::instance()
    ->report($name_in, $parms, $print);
  $format = @$desc['format'];
  if (!$format || $format == 'web') {
    $output = check_markup($output, variable_get('forena_input_format', FILTER_FORMAT_DEFAULT), FALSE);
  }
  $m_path = drupal_get_path('module', 'forena');
  forena_include_data_tables();
  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;
}