html hyperlink are not available in jasper report

0
Using java i can able to generate the word jasper report where i have html links ( used to go from one place to another place) . i have already set markup propery as html .
 
JRDocxExporter newExporter = new JRDocxExporter();
newExporter.setParameter(JRDocxExporterParameter.JASPER_PRINT_LIST, jasperPrintList);
newExporter.setParameter(JRDocxExporterParameter.OUTPUT_FILE_NAME, "REPORT_NAME" + System.currentTimeMillis() + ".docx");
newExporter.exportReport();
 
with same jrxml , i am exported the word document from struts action . i am not able to get the html links in document. i dont know what is the issue . i have tried with several content type.
 
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
..
..
..
ServletOutputStream outputStream = null;
outputStream = response.getOutputStream();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
JRDocxExporter docExporter = new JRDocxExporter();
docExporter.setParameter(JRDocxExporterParameter.JASPER_PRINT_LIST, jasperPrintList);
docExporter.setParameter(JRDocxExporterParameter.OUTPUT_STREAM, byteArrayOutputStream);
docExporter.setParameter(JRDocxExporterParameter.OUTPUT_FILE_NAME, REPORT_NAME);
docExporter.exportReport();
response.setHeader("Cache-Control", "max-age=0");
// response.setContentType("application/vnd.openxmlformats-officedocument.wordprocessingml.document");
// response.setContentType("application/vnd.ms-word");
response.setContentType("application/ms-word");
response.setHeader("Content-disposition", "attachment; filename=\"" + REPORT_NAME + "\"");
outputStream.write(byteArrayOutputStream.toByteArray());
outputStream.flush();
outputStream.close();
response.flushBuffer();
anbalagan.marimuthu's picture
Joined: Jun 29 2015 - 11:58pm
Last seen: 2 years 7 months ago

1 Answer:

0

 

anbalagan.marimuthu's picture
Joined: Jun 29 2015 - 11:58pm
Last seen: 2 years 7 months ago
Feedback
randomness