You are here

function forena_report_include in Forena Reports 7.5

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

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

Parameters

$report_name String:

$parms array of parameters to include:

2 calls to forena_report_include()
FrxInclude::render in src/Renderer/FrxInclude.php
Default Render action, which simply does normal forena rendering. You can use renderDomNode at any time to generate the default forena rendering methods.
RendererBase::renderDomNode in src/Renderer/RendererBase.php
Recursive report renderer Walks the nodes rendering the report.

File

./forena.module, line 1076

Code

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

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