You are here

function forena_report_block_preview in Forena Reports 8

Same name and namespace in other branches
  1. 7.5 forena.report.inc \forena_report_block_preview()
  2. 7.4 forena.report.inc \forena_report_block_preview()

Page to allow selection of a data block with parameters.

Parameters

unknown $report_name:

unknown $block_name:

string $id:

Return value

Ambigous <unknown, multitype:multitype:NULL Ambigous <string, multitype:multitype:multitype:string multitype:multitype:string unknown > Ambigous <The, boolean, string> >

File

./forena.report.inc, line 907

Code

function forena_report_block_preview($report_name, $action, $block_name, $id = '') {
  $parms = $_GET;
  unset($parms['q']);
  $preview = forena_data_block_preview($block_name, $parms);
  if (@trim($preview['content']['#markup'])) {
    $content['select'] = drupal_get_form('forena_report_block_select_form', $report_name, $action, $block_name, $id);
  }
  else {
    drupal_set_message(t('Sample data is required in order to correctly generate a template.  Try changing parameters'), 'warning');
  }
  $content['preview'] = $preview;
  return $content;
}