fix: SQLReport templatable download now allows nested queries
This commit is contained in:
parent
4ca4c85d0a
commit
a9d637199c
2 changed files with 7 additions and 10 deletions
|
|
@ -28,6 +28,7 @@
|
||||||
- fix: Importing a package doesn't follow auto commit settings
|
- fix: Importing a package doesn't follow auto commit settings
|
||||||
- add: DataForm template variable for the group to view entries
|
- add: DataForm template variable for the group to view entries
|
||||||
- fix: EMS Badge Reporting overlaps with other EMS on the system
|
- fix: EMS Badge Reporting overlaps with other EMS on the system
|
||||||
|
- fix: SQLReport templatable download doesn't run nested queries
|
||||||
|
|
||||||
7.4.5
|
7.4.5
|
||||||
- fix: Apostrophy incorrectly escaped as double quote in some places
|
- fix: Apostrophy incorrectly escaped as double quote in some places
|
||||||
|
|
|
||||||
|
|
@ -392,12 +392,9 @@ sub download {
|
||||||
# Store queries in class
|
# Store queries in class
|
||||||
$self->_storeQueries();
|
$self->_storeQueries();
|
||||||
|
|
||||||
# Call _processQuery
|
|
||||||
my $data = $self->_processQuery(0,0);
|
|
||||||
|
|
||||||
|
|
||||||
# If we're downloading CSV
|
# If we're downloading CSV
|
||||||
if ($self->getValue("downloadType") eq "csv") {
|
if ($self->getValue("downloadType") eq "csv") {
|
||||||
|
my $data = $self->_processQuery(0,0);
|
||||||
my $out = "";
|
my $out = "";
|
||||||
|
|
||||||
### Loop through the returned structure and put it through Text::CSV
|
### 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->{rows_loop}->[0]->{"row.field_loop"}}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
# Data lines
|
# Data lines
|
||||||
for my $row (@{$data->{rows_loop}}) {
|
for my $row (@{$data->{rows_loop}}) {
|
||||||
$out .= "\n".joinCSV(map { $_->{"field.value"} }
|
$out .= "\n".joinCSV(map { $_->{"field.value"} }
|
||||||
@{$row->{"row.field_loop"}}
|
@{$row->{"row.field_loop"}}
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $out;
|
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"));
|
return $self->processTemplate($data,$self->get("downloadTemplateId"));
|
||||||
|
}
|
||||||
} else {
|
else {
|
||||||
# I don't know what to do
|
# I don't know what to do
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue