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;
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;
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;
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;
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;
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;
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;
foreach my $col ( @$cols ) {
print $col->{coltitle}.$sep;
}
- print "\n";
+ print "Total\n";
# Table
foreach my $line ( @$lines ) {
my $x = $line->{loopcell};
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;