Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Displays HTML entities
Migrateduser
I'm using below Java code to display Birt HTML format report in the App., but I see HTML entities also getting displayed:
Note: In the Birt design file, table is generated dynamically from the event handler (Java file).
Please check the attachment for the ERROR.
Let me know what more information you require for the resolution.
design = mspReportEngine.openReportDesign(getServletContext().getRealPath("/WEB-INF/") + File.separator + "reports" + File.separator + ReportUtils.getReportDesignFile(parameters, report));
IRunAndRenderTask task = mspReportEngine.createRunAndRenderTask(design);
task.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY, ReportController.class.getClassLoader());
if (AuthenticationContext.hasPermission("TICKETS_MANAGE")) {
parameters.put("canCreateTickets", "true");
}
parameters.put("varLogo", varLogo);
if (media.equalsIgnoreCase("pdf") || media.equalsIgnoreCase("ppt") ) {
parameters.put("logoData", getImageInBytes(varLogo, msp));
} else {
parameters.put("logoData", "no-logo".getBytes());
}
String completeFilename=downloadName.trim()+"_"+clientId+"_"+".html";
String completeRptDocumentFilename=downloadName.trim()+"_"+clientId+"_"+".rptdocument";
String fileAbsolutePath="/tmp/"+completeFilename;
String rptDocumentAbsolutePath="/tmp/"+completeRptDocumentFilename;
Enumeration<String> keys = parameters.keys();
while (keys.hasMoreElements()) {
String key = keys.nextElement().toString();
task.setParameterValue(key, parameters.get(key));
}
task.setParameterValue("reportType", reportName);
task.setParameterValue("media", media);
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFormat("html");
options.setImageHandler(new HTMLServerImageHandler());
options.setSupportedImageFormats("JPG;PNG;BMP;SVG;GIF");
out = response.getOutputStream();
options.setOutputStream(out);
((HTMLRenderOption) options).setBaseImageURL(request.getContextPath() + "/Images");
((HTMLRenderOption) options).setImageDirectory(sc.getRealPath("/Images"));
task.setRenderOption(options);
task.run();
task.close();
Find more posts tagged with
Comments
There are no comments yet