If you create an SQL report that includes one or more parameters,
using the 'rows per page' pulldown does not work. Instead, it will
prompt for the parameters again and shows the first page of output.
Test Plan:
1) Create a new report from sql as follows:
SELECT * FROM borrowers WHERE surname LIKE <<Last Name>> AND firstname LIKE <<First Name>>
2) Run this report
3) Change the 'Rows per page' and click 'Update'
4) This should kick you back to the start where the report asks you for your parameters
5) Apply the patch
6) Repeat step 3, this time is should work correctly
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works nicely now. All tests and QA script pass.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
[% IF ( unlimited_total ) %]<p>Total number of rows matching the (unlimited) query is [% unlimited_total %].</p>[% END %]
<pre id="sql_output">[% sql |html %]</pre>
-<form>
+<form action="/cgi-bin/koha/reports/guided_reports.pl" method="get">
<input type="hidden" name="phase" value="Run this report"/>
<input type="hidden" name="reports" value="[% report_id %]"/>
+ [% FOREACH p IN sql_params %]
+ <input type="hidden" name="sql_params" value="[% p %]"/>
+ [% END %]
+
<label for="limit">Rows per page: </label>
<select name="limit">
[% limits = [ 10, 20, 50, 100, 200, 300, 400, 500, 1000 ] %]
'errors' => $errors,
'pagination_bar' => pagination_bar($url, $totpages, $input->param('page')),
'unlimited_total' => $total,
+ 'sql_params' => \@sql_params,
);
}
}