[% INCLUDE 'doc-head-open.inc' %] Koha › Reports › Guided reports wizard [% IF ( saved1 ) %]› Saved Reports [% ELSIF ( create ) %]› Create from SQL [% ELSIF ( showsql ) %]› Saved reports › SQL view [% ELSIF ( execute ) %]› Saved reports › [% name %] Report [% ELSIF ( buildx ) %]› Build a report, step [% buildx %] of 6: [% IF ( build1 ) %]Choose a module [% ELSIF ( build2 ) %]Pick a report type [% ELSIF ( build3 ) %]Select columns for display [% ELSIF ( build4 ) %]Select criteria to limit on [% ELSIF ( build5 ) %]Pick which columns to total [% ELSIF ( build6 ) %]Select how you want the report ordered [% END %] [% END %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'calendar.inc' %] [% INCLUDE 'header.inc' %] [% INCLUDE 'circ-search.inc' %]
[% INCLUDE "reports-toolbar.inc" %] [% IF ( start ) %]

Guided reports

Use the guided reports engine to create non standard reports. This feature aims to provide some middle ground between the built in canned reports and writing custom SQL reports.

Build and run reports

[% IF ( CAN_user_reports_create_reports ) %]
[% END %] [% IF ( CAN_user_reports_execute_reports ) %]
[% END %] [% IF ( CAN_user_reports_create_reports ) %]
[% END %]

Reports Dictionary

Use the reports dictionary to define custom criteria to use in your reports

[% END %] [% IF ( saved1 ) %] [% IF ( savedreports ) %]

Saved reports

[% INCLUDE 'table-pager.inc' perpage='20' %]
[% IF (usecache) %] [% END %] [% FOREACH savedreport IN savedreports %] [% UNLESS ( loop.odd ) %][% ELSE %][% END %] [% IF (savedreport.public) %] [% ELSE %] [% END %] [% IF (usecache) %] [% END %] [% IF ( CAN_user_reports_create_reports ) %] [% END %] [% END %]
ID Report name Type Area Group Subgroup Notes Author Creation date PublicCache expiry (seconds)Saved results Saved SQL    
[% savedreport.id %] [% savedreport.report_name %] [% savedreport.type %] [% savedreport.areaname %] [% savedreport.groupname %] [% savedreport.subgroupname %] [% savedreport.notes %] [% savedreport.borrowersurname %][% IF ( savedreport.borrowerfirstname ) %], [% savedreport.borrowerfirstname %][% END %] ([% savedreport.borrowernumber %]) [% savedreport.date_created %]YesNo[% savedreport.cache_expiry %][% IF ( savedreport.date_run ) %][% savedreport.date_run %][% END %] Show [% IF ( CAN_user_reports_create_reports ) %]   Edit [% END %] Run ScheduleDelete
[% ELSE %]
[% IF (filter_set) %]

No saved reports match your criteria.

[% IF ( CAN_user_reports_create_reports ) %]
[% END %] [% ELSE %]

There are no saved reports.

[% IF ( CAN_user_reports_create_reports ) %] Build a new report? [% END %] [% END %]
[% END %] [% END %] [% IF ( build1 ) %] [% IF ( cache_error) %]
Please choose a cache_expiry less than 30 days
[% END %]

Build a report

Step 1 of 6: Choose a module to report on,[% IF (usecache) %] Set cache expiry, [% END %] and Choose report visibility
  1. [% IF (public) %]
  2. [% ELSE %]
  3. [% END %] [% IF (usecache) %]
  4. [% END %]
[% END %] [% IF ( build2 ) %]

Build A Report

Step 2 of 6: Pick a report type
[% END %] [% IF ( build3 ) %]

Step 3 of 6: Select columns for display

Note: Be careful selecting when selecting columns. If your choice is too broad it could result in a very large report that will either not complete, or slow your system down.


[% END %] [% IF ( build4 ) %]
Step 4 of 6: Select criteria to limit on [% FOREACH criteri IN criteria %] [% IF ( criteri.date ) %] [% ELSE %] [% IF ( criteri.textrange ) %] [% ELSE %] [% IF ( criteri.daterange ) %] [% ELSE %] [% END %] [% END %] [% END %] [% END %]
[% INCLUDE 'date-format.inc' %]
from to
from to [% INCLUDE 'date-format.inc' %]
[% IF ( definitions ) %]
Dictionary definitions [% FOREACH definition IN definitions %] [% END %]
[% definition.name %]
[% END %]
[% END %] [% IF ( build5 ) %]

Step 5 of 6: Pick which columns to total

[% FOREACH total_b IN total_by %] [% END %]
[% END %] [% IF ( build6 ) %]

Step 6 of 6: Choose how you want the report ordered

[% FOREACH order_b IN order_by %] [% END %]
[% END %] [% IF ( showreport ) %]

Confirm custom report

Your report will be generated with the following SQL statement.

[% sql |html %]

You will need to save the report before you can execute it

[% END %] [% IF ( save ) %]
Save your custom report
  1. [% IF groups_with_subgroups %]
  2. [% END %]
[% END %] [% IF ( enter_params ) %]

Enter parameters for report [% name %]:

[% IF ( notes ) %]

[% notes %]

[% END %]
    [% FOREACH sql_param IN sql_params %] [% IF sql_param.input == 'date' %]
  1. [% ELSIF ( sql_param.input == 'text' ) %]
  2. [% ELSE %]
  3. [% sql_param.input %]
  4. [% END %] [% END %]
[% END %] [% IF ( execute ) %]

[% name %]

[% IF ( notes ) %]

[% notes %]

[% END %] [% IF ( unlimited_total ) %]

Total number of rows matching the (unlimited) query is [% unlimited_total %].

[% END %]
[% sql |html %]
[% pagination_bar %]
[% UNLESS ( errors ) %] [% FOREACH header_ro IN header_row %][% END %] [% FOREACH result IN results %] [% FOREACH cell IN result.cells %][% END %] [% END %]
[% header_ro.cell %]
[% cell.cell %]
[% END %] [% END %] [% IF ( create ) %]
Create report from SQL
  1. [% IF ( reportname ) %] [% ELSE %][% END %]
  2. [% IF groups_with_subgroups %]
  3. [% END %] [% IF (public) %]
  4. [% ELSE %]
  5. [% END %] [% IF (usecache) %]
  6. [% END %]
SQL:
Cancel
[% END %] [% IF ( compound ) %]
Master:   Sub report:
[% END %] [% IF ( save_compound ) %] [% master %]
[% subsql %] [% END %] [% IF ( retresults ) %]

Saved report results

[% name %]

[% notes %]

[% FOREACH result IN results %] [% result.row %] [% END %]
[% END %] [% IF ( showsql ) %]
[% reportname %]
    [% IF ( notes ) %]
  1. Notes: [% notes %]
  2. [% ELSE %][% END %]
[% END %] [% IF ( editsql ) %]
Edit SQL report
  1. [% IF groups_with_subgroups %]
  2. [% END %] [% IF (public) %]
  3. [% ELSE %]
  4. [% END %] [% IF (usecache) %]
  5. [% END %]
Cancel
[% END %] [% IF ( save_successful ) %] [% UNLESS ( errors ) %]

Your report has been saved

[% reportname %]

[% END %] [% END %] [% IF ( errors ) %]
The following error was encountered:
[% FOREACH error IN errors %] [% IF ( error.sqlerr ) %]This report contains the SQL keyword [% error.sqlerr %].
Use of this keyword is not allowed in Koha reports due to security and data integrity risks. Only SELECT queries are allowed.
Please return to the "Saved Reports" screen and delete this report or retry creating a new one. [% ELSIF ( error.queryerr ) %]The database returned the following error:
[% error.queryerr %]
Please check the log for further details. [% ELSIF ( error.cache_expiry ) %]Please select a cache expiry less than 30 days. [% ELSE %] [% END %] [% END %]
[% END %]
[% IF ( saved1 ) %]

Filter

  1. [% INCLUDE 'date-format.inc' %]
[% END %] [% INCLUDE 'guided-reports-view.inc' %]
[% INCLUDE 'intranet-bottom.inc' %]