Fixing Bug : Not Opening the spreadsheet manager software on file exports.
authorhdl <hdl>
Fri, 4 Mar 2005 13:48:16 +0000 (13:48 +0000)
committerhdl <hdl>
Fri, 4 Mar 2005 13:48:16 +0000 (13:48 +0000)
reports/acquisitions_stats.pl
reports/borrowers_stats.pl
reports/catalogue_stats.pl
reports/issues_stats.pl

index 257c8f9..a54ff87 100755 (executable)
@@ -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;
index 326a4c7..9fce669 100755 (executable)
@@ -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;
index 87344b4..ef85a8b 100755 (executable)
@@ -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;
index d68ed34..5da297a 100755 (executable)
@@ -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;