MIFOSX-2074

This commit is contained in:
Vishwas Babu A J
2015-06-15 15:21:11 -07:00
parent be9cb891c9
commit e088d50f5d
2 changed files with 3 additions and 3 deletions
@@ -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();
}
@@ -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();
}