You are here

function forena_query_preview in Forena Reports 7.5

Same name and namespace in other branches
  1. 8 forena_query/forena_query.inc \forena_query_preview()
  2. 7.3 forena_query.inc \forena_query_preview()
  3. 7.4 forena_query.inc \forena_query_preview()
1 string reference to 'forena_query_preview'
forena_query_editor in ./forena_query.inc
Basic SQL Editor form hook implementation

File

./forena_query.inc, line 201

Code

function forena_query_preview($form, &$form_state) {
  $form_state['rebuild'] = TRUE;
  $parms = $form_state['storage']['parameters'];
  if (isset($form_state['values']['parameters'])) {
    $parms = $form_state['storage']['parameters'] = $form_state['values']['parameters'];
  }
  $preview = forena_data_block_preview($form_state['storage']['block_name'], $parms, TRUE);
  $form_state['storage']['preview'] = $preview['content'];
}