You are here

function forena_report_include in Forena Reports 7.4

Same name and namespace in other branches
  1. 8 forena.module \forena_report_include()
  2. 7.5 forena.module \forena_report_include()
  3. 7.3 forena.module \forena_report_include()

Render report as an inlcude. Don't perform the output fuctnions for the document

Parameters

$report_name String:

$parms array of parameters to include:

2 calls to forena_report_include()
FrxInclude::render in renderers/FrxInclude.inc
Default Render action, which simply does normal forena rendering. You can use renderDomNode at any time to generate the default forena rendering methods.
FrxReportContext::getValue in contexts/FrxReportContext.inc

File

./forena.module, line 1137

Code

function forena_report_include($report_name, $parms = array()) {
  $output = '';
  require_once 'forena.common.inc';
  $desc = Frx::Menu()
    ->parseURL($report_name);
  $name = $desc['name'];
  $r = @FrxReportGenerator::instance()
    ->get_report($name, $parms);
  if (!$r || !$r->rpt_xml) {
    return '';
  }

  //check for default parameters
  $r
    ->processParameters();
  $format = $desc['format'];
  $r
    ->render($format, FALSE, NULL, TRUE);
  return $r->html;
}