@PathParam("queryname") String queryName,
@PathParam("format") String format,
@FormParam("svg") @DefaultValue("") String svg) {
try {
PdfReport pdf = new PdfReport();
CellDataSet cs = null;
if (StringUtils.isNotBlank(format)) {
cs = olapQueryService.execute(queryName, format);
} else {
cs = olapQueryService.execute(queryName);
}
byte[] doc = pdf.pdf(cs, svg);
return Response.ok(doc).type("application/pdf").header(
"content-disposition",
"attachment; filename = export.pdf").header(
"content-length", doc.length).build();
} catch (Exception e) {