String query = reportQuery.getScript();
if (StringUtils.isBlank(query)) {
return Collections.emptyList();
}
QueryRunner runner = new QueryRunner(dataSource);
try {
final QueryPack pack = prepareQuery(query, parentBand, params);
ArrayList<Object> resultingParams = new ArrayList<Object>();
QueryParameter[] queryParameters = pack.getParams();
for (QueryParameter queryParameter : queryParameters) {
if (queryParameter.isSingleValue()) {
resultingParams.add(queryParameter.getValue());
} else {
resultingParams.addAll(queryParameter.getMultipleValues());
}
}
resList = runner.query(pack.getQuery(), resultingParams.toArray(), new ResultSetHandler<List>() {
@Override
public List handle(ResultSet rs) throws SQLException {
List<Object[]> resList = new ArrayList<Object[]>();
while (rs.next()) {