fix: SQLReport templatable download now allows nested queries

This commit is contained in:
Doug Bell 2007-09-07 21:04:39 +00:00
parent 4ca4c85d0a
commit a9d637199c
2 changed files with 7 additions and 10 deletions

View file

@ -28,6 +28,7 @@
- fix: Importing a package doesn't follow auto commit settings
- add: DataForm template variable for the group to view entries
- fix: EMS Badge Reporting overlaps with other EMS on the system
- fix: SQLReport templatable download doesn't run nested queries
7.4.5
- fix: Apostrophy incorrectly escaped as double quote in some places

View file

@ -392,12 +392,9 @@ sub download {
# Store queries in class
$self->_storeQueries();
# Call _processQuery
my $data = $self->_processQuery(0,0);
# If we're downloading CSV
if ($self->getValue("downloadType") eq "csv") {
my $data = $self->_processQuery(0,0);
my $out = "";
### Loop through the returned structure and put it through Text::CSV
@ -407,21 +404,20 @@ sub download {
@{$data->{rows_loop}->[0]->{"row.field_loop"}}
);
# Data lines
for my $row (@{$data->{rows_loop}}) {
$out .= "\n".joinCSV(map { $_->{"field.value"} }
@{$row->{"row.field_loop"}}
);
}
return $out;
} elsif ($self->getValue("downloadType") eq "template") {
}
elsif ($self->getValue("downloadType") eq "template") {
my $data = $self->_processQuery(1,0);
return $self->processTemplate($data,$self->get("downloadTemplateId"));
} else {
}
else {
# I don't know what to do
return;
}