$self->{options} = {
'std_column_visibility' => 0,
'output_format' => 'HTML',
+ 'controller_class ' => '',
'allow_pdf_export' => 1,
'allow_csv_export' => 1,
'html_template' => 'report_generator/html_report',
'EXPORT_VARIABLE_LIST' => join(' ', @{ $self->{export}->{variable_list} }),
'EXPORT_NEXTSUB' => $self->{export}->{nextsub},
'DATA_PRESENT' => $self->{data_present},
+ 'CONTROLLER_DISPATCH' => $opts->{controller_class},
};
return $variables;
}
}
+sub check_for_pdf_api {
+ return eval { require PDF::API2; 1; } ? 1 : 0;
+}
+
1;
__END__
The template to be used for HTML reports. Default is 'report_generator/html_report'.
+=item controller_class
+
+If this is used from a C<SL::Controller::Base> based controller class, pass the
+class name here and make sure C<SL::Controller::Helper::ReportGenerator> is
+used in the controller. That way the exports stay functional.
+
=back
=head2 PDF Options