@@ -, +, @@ name for download - Apply patch - Got to Home > Reports > Guided reports wizard > Saved reports (or create a new report from sql) - Run a saved report - Download the report (as csv, tab, ods) - Bonus test: Try to downlaod saved reports which have special character in their name. --- .../intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt | 1 + reports/guided_reports.pl | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) --- 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 @@ -841,6 +841,7 @@ canned reports and writing custom SQL reports.

+ [% END %] [% END %] --- a/reports/guided_reports.pl +++ a/reports/guided_reports.pl @@ -797,6 +797,8 @@ elsif ($phase eq 'Export'){ # export results to tab separated text or CSV my $sql = $input->param('sql'); # FIXME: use sql from saved report ID#, not new user-supplied SQL! my $format = $input->param('format'); + my $reportname = $input->param('reportname'); + my $reportfilename = $reportname ? "$reportname-reportresults.$format" : "reportresults.$format" ; my ($sth, $q_errors) = execute_query($sql); unless ($q_errors and @$q_errors) { my ( $type, $content ); @@ -870,7 +872,7 @@ elsif ($phase eq 'Export'){ } print $input->header( -type => $type, - -attachment=>"reportresults.$format" + -attachment=> $reportfilename ); print $content; --