function forena_data_block_preview in Forena Reports 7.5
Same name and namespace in other branches
- 8 forena_ui/forena.data.inc \forena_data_block_preview()
- 7.4 forena.data.inc \forena_data_block_preview()
3 calls to forena_data_block_preview()
- forena_data_preview in ./
forena.data.inc - forena_query_preview in ./
forena_query.inc - forena_report_block_preview in ./
forena.report.inc - Page to allow selection of a data block with parameters.
File
- ./
forena.data.inc, line 59
Code
function forena_data_block_preview($block_name, $parms = array(), $edit = FALSE) {
if (isset($_SESSION['forena_report_editor']['__forena_block_preview__'])) {
unset($_SESSION['forena_report_editor']['__forena_block_preview__']);
}
$o = Frx::Editor('__forena_block_preview__');
$o->frxReport->block_edit_mode = $edit;
$o
->alterParameters($parms);
$o
->setEditorParms($parms);
$config = array();
$o
->addBlock($block_name, 'FrxTable', $config);
$o
->update();
$content = $o
->preview($parms);
$o
->cancel();
return $content;
}