C4::Reports::Guided - Module for generating guided reports
use C4::Reports::Guided;
This will return a list of all the available report types
This will return a list of all the available report areas
This will return a list of all tables in the database
This will return a list of all columns for a report area
This will build the sql needed to return the results asked for, $columns is expected to be of the format tablename.columnname. This is what get_columns returns.
Returns an arraref to hashrefs suitable for using in a tmpl_loop. With the criteria and available values.
($results, $total) = execute_query($sql, $type, $offset, $limit, $format, $id)
When passed C<$sql>, this function returns an array ref containing a result set suitably formatted for display in html or for output as a flat file when passed in C<$format> and C<$id>. It also returns the C<$total> records available for the supplied query. If passed any query other than a SELECT, or if there is a db error, C<$errors> an array ref is returned containing the error after this manner: C<$error->{'sqlerr'}> contains the offending SQL keyword. C<$error->{'queryerr'}> contains the native db engine error returned for the query. Valid values for C<$format> are 'text,' 'tab,' 'csv,' or 'url. C<$sql>, C<$type>, C<$offset>, and C<$limit> are required parameters. If a valid C<$format> is passed in, C<$offset> and C<$limit> are ignored for obvious reasons. A LIMIT specified by the user in a user-supplied SQL query WILL apply in any case.
Given some sql and a name this will saved it so that it can resued
This will take 2 reports and create a compound report using both of them
This takes a column name of the format table.column and will return what type it is (free text, set values, date)
Given a column name, return an arrary ref of hashrefs suitable for use as a tmpl_loop with the distinct values of the column
Chris Cormack <crc@liblime.com>