@@ -, +, @@ --- .../en/modules/reports/guided_reports_start.tt | 20 ++++++++++++++++++++ reports/guided_reports.pl | 9 +++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -579,6 +579,26 @@ canned reports and writing custom SQL reports.

[% 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 ) %] --- a/reports/guided_reports.pl +++ a/reports/guided_reports.pl @@ -523,7 +523,7 @@ elsif ( $phase eq 'Save Report' ) { elsif ($phase eq 'Run this report'){ # execute a saved report - my $limit = 20; # page size. # TODO: move to DB or syspref? + my $limit = $input->param('limit') || 20; my $offset = 0; my $report_id = $input->param('reports'); my @sql_params = $input->param('sql_params'); @@ -532,6 +532,11 @@ elsif ($phase eq 'Run this report'){ $offset = ($input->param('page') - 1) * $limit; } + $template->param( + 'limit' => $limit, + 'report_id' => $report_id, + ); + my ( $sql, $type, $name, $notes ); if (my $report = get_saved_report($report_id)) { $sql = $report->{savedsql}; @@ -654,7 +659,7 @@ elsif ($phase eq 'Run this report'){ } my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0); - my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report_id&phase=Run%20this%20report"; + my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report_id&phase=Run%20this%20report&limit=$limit"; if (@sql_params) { $url = join('&sql_params=', $url, map { URI::Escape::uri_escape($_) } @sql_params); } --