You are here

function forena_data_block_preview in Forena Reports 8

Same name and namespace in other branches
  1. 7.5 forena.data.inc \forena_data_block_preview()
  2. 7.4 forena.data.inc \forena_data_block_preview()
3 calls to forena_data_block_preview()
forena_data_preview in forena_ui/forena.data.inc
forena_query_preview in forena_query/forena_query.inc
forena_report_block_preview in ./forena.report.inc
Page to allow selection of a data block with parameters.

File

forena_ui/forena.data.inc, line 68
forena.data.inc Common files for diplaying and previewing data blocks.

Code

function forena_data_block_preview($block_name, $parms = array(), $edit = FALSE) {
  $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;
}