From 397688c20e0fe218936668319219dcf617c74223 Mon Sep 17 00:00:00 2001 From: hdl Date: Fri, 4 Mar 2005 13:48:16 +0000 Subject: [PATCH] Fixing Bug : Not Opening the spreadsheet manager software on file exports. --- reports/acquisitions_stats.pl | 6 ++++-- reports/borrowers_stats.pl | 6 ++++-- reports/catalogue_stats.pl | 6 ++++-- reports/issues_stats.pl | 18 ++++++++---------- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/reports/acquisitions_stats.pl b/reports/acquisitions_stats.pl index 257c8f9630..a54ff87cc5 100755 --- a/reports/acquisitions_stats.pl +++ b/reports/acquisitions_stats.pl @@ -71,7 +71,9 @@ if ($do_it) { output_html_with_http_headers $input, $cookie, $template->output; exit(1); } else { - print $input->header(-type => 'application/vnd.sun.xml.calc', -name=>"$basename.csv" ); + print $input->header(-type => 'application/vnd.sun.xml.calc', + -attachment=>"$basename.csv", + -name=>"$basename.csv" ); my $cols = @$results[0]->{loopcol}; my $lines = @$results[0]->{looprow}; my $sep; @@ -80,7 +82,7 @@ if ($do_it) { foreach my $col ( @$cols ) { print $col->{coltitle}.$sep; } - print "\n"; + print "Total\n"; foreach my $line ( @$lines ) { my $x = $line->{loopcell}; print $line->{rowtitle}.$sep; diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl index 326a4c7d79..9fce669651 100755 --- a/reports/borrowers_stats.pl +++ b/reports/borrowers_stats.pl @@ -70,7 +70,9 @@ if ($do_it) { output_html_with_http_headers $input, $cookie, $template->output; exit(1); } else { - print $input->header(-type => 'application/vnd.sun.xml.calc', -name=>"$basename.csv" ); + print $input->header(-type => 'application/vnd.sun.xml.calc', + -name=>"$basename.csv", + -attachment=>"$basename.csv"); my $cols = @$results[0]->{loopcol}; my $lines = @$results[0]->{looprow}; my $sep; @@ -79,7 +81,7 @@ if ($do_it) { foreach my $col ( @$cols ) { print $col->{coltitle}.$sep; } - print "\n"; + print "Total\n"; foreach my $line ( @$lines ) { my $x = $line->{loopcell}; print $line->{rowtitle}.$sep; diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl index 87344b4890..ef85a8ba03 100755 --- a/reports/catalogue_stats.pl +++ b/reports/catalogue_stats.pl @@ -71,7 +71,9 @@ if ($do_it) { output_html_with_http_headers $input, $cookie, $template->output; exit(1); } else { - print $input->header(-type => 'application/vnd.sun.xml.calc', -name=>"$basename.csv" ); + print $input->header(-type => 'application/vnd.sun.xml.calc', + -attachment=>"$basename.csv", + -name=>"$basename.csv" ); my $cols = @$results[0]->{loopcol}; my $lines = @$results[0]->{looprow}; my $sep; @@ -80,7 +82,7 @@ if ($do_it) { foreach my $col ( @$cols ) { print $col->{coltitle}.$sep; } - print "\n"; + print "Total\n"; foreach my $line ( @$lines ) { my $x = $line->{loopcell}; print $line->{rowtitle}.$sep; diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index d68ed3492c..5da297ad95 100755 --- a/reports/issues_stats.pl +++ b/reports/issues_stats.pl @@ -76,11 +76,9 @@ if ($do_it) { exit(1); } else { # Printing to a csv file - print $input->header(-type => 'application/vnd.ms-excel', - -disposition=>'inline', -# -title=>"$basename.csv", -# -file=>"$basename.csv", - -filename=>"$basename.csv" ); + print $input->header(-type => 'application/vnd.sun.xml.calc', + -attachment=>"$basename.csv", + -filename=>"$basename.csv" ); my $cols = @$results[0]->{loopcol}; my $lines = @$results[0]->{looprow}; my $sep; @@ -91,7 +89,7 @@ if ($do_it) { foreach my $col ( @$cols ) { print $col->{coltitle}.$sep; } - print "\n"; + print "Total\n"; # Table foreach my $line ( @$lines ) { my $x = $line->{loopcell}; @@ -270,10 +268,10 @@ sub calculate { push @loopfilter, \%cell; } } - push @loopfilter,{crit=>"Issue|Return : ",filter=>$type}; - push @loopfilter,{crit=>"Display by :",filter=>$dsp} if ($dsp); - push @loopfilter,{crit=>"Select Day :",filter=>$daysel} if ($daysel); - push @loopfilter,{crit=>"Select Month :",filter=>$daysel} if ($monthsel); + push @loopfilter,{crit=>"Issue|Return ",filter=>$type}; + push @loopfilter,{crit=>"Display by ",filter=>$dsp} if ($dsp); + push @loopfilter,{crit=>"Select Day ",filter=>$daysel} if ($daysel); + push @loopfilter,{crit=>"Select Month ",filter=>$daysel} if ($monthsel); my @linefilter; -- 2.39.5