MIFOSX-2074
This commit is contained in:
+2
-2
@@ -59,7 +59,7 @@ public class RunreportsApiResource {
|
||||
@GET
|
||||
@Path("{reportName}")
|
||||
@Consumes({ MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON, "application/x-msdownload", "application/vnd.ms-excel", "application/pdf", "text/html" })
|
||||
@Produces({ MediaType.APPLICATION_JSON, "text/csv", "application/vnd.ms-excel", "application/pdf", "text/html" })
|
||||
public Response runReport(@PathParam("reportName") final String reportName, @Context final UriInfo uriInfo) {
|
||||
|
||||
final MultivaluedMap<String, String> queryParams = uriInfo.getQueryParameters();
|
||||
@@ -128,7 +128,7 @@ public class RunreportsApiResource {
|
||||
final StreamingOutput result = this.readExtraDataAndReportingService
|
||||
.retrieveReportCSV(reportName, parameterTypeValue, reportParams);
|
||||
|
||||
return Response.ok().entity(result).type("application/x-msdownload")
|
||||
return Response.ok().entity(result).type("text/csv")
|
||||
.header("Content-Disposition", "attachment;filename=" + reportName.replaceAll(" ", "") + ".csv").build();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -288,7 +288,7 @@ public class ReadReportingServiceImpl implements ReadReportingService {
|
||||
|
||||
if ("CSV".equalsIgnoreCase(outputType)) {
|
||||
CSVReportUtil.createCSV(masterReport, baos, "UTF-8");
|
||||
return Response.ok().entity(baos.toByteArray()).type("application/x-msdownload")
|
||||
return Response.ok().entity(baos.toByteArray()).type("text/csv")
|
||||
.header("Content-Disposition", "attachment;filename=" + reportName.replaceAll(" ", "") + ".csv").build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user