Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Displays HTML entities
SudhakarA
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
SudhakarA
Please check the attachment for the error.
SudhakarA
Hello Team,
Can I get any solution for the above problem, as it is becoming critical.
Thanks,
Sudhakar
kclark
Can you post your rptdesign?
SudhakarA
Hi,
Please check the attached rptDesign file and the event handlers .java files.
Note: Columns and Rows are dynamically getting generated from event handler .java file.
Looking for the fix.
Thank you,
Sudhakar
SudhakarA
This is the another report got failed. This report is not generating table dynamically, simply sending ticket value with anchor tag for click-able.
Check the attachment.
SudhakarA
Hello Team,
Can I get any fix for this issue?
SudhakarA
Team,
Any updates for fix.
kclark
You're wanting to display the html in your table, correct? You could create a text item set to html under sno. Then make sno's visibility to false. Then in the onCreate() of the text item you could grab the text from sno and display it using this.text.
SudhakarA
<blockquote class='ipsBlockquote' data-author="'kclark'" data-cid="117127" data-time="1369327465" data-date="23 May 2013 - 09:44 AM"><p>
You're wanting to display the html in your table, correct? You could create a text item set to html under sno. Then make sno's visibility to false. Then in the onCreate() of the text item you could grab the text from sno and display it using this.text.<br /></p></blockquote>
<br />
Can you check the design file exbpa-checklist.rptdesign which is attached above, it is the ticket column which is getting displayed as html code in the browser.<br />
Can you please provide your correction in the design file and send me the attachment.