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
Developing Analytics Applications
Embedded image not being displayed
Migrateduser
<p>I'm trying to embed an image in the report and render it as HTML. The problem is, the HTML emitter seems to be adding a div around the TextItem with the style="overflow:hidden;" which causes the image to not be displayed. I can't for the life of me figure out how to stop the style from being added to the div. Here's what's being generated:</p>
<pre class="_prettyXprint">
<div style=" overflow:hidden;"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
9TXL0Y4OHwAAAABJRU5ErkJggg=="/></div></pre>
<p>The red dot image isn't exactly what I'm trying to display, the real image is much larger. The encoding is just a lot smaller for the purposes of this post.</p>
<p> </p>
<p>Code that adds the item to the report:</p>
<p> </p>
<div>
<pre class="_prettyXprint">
TextItemHandle textItem = this.reportDesign.getElementFactory().newTextItem("chart");
textItem.setContentType(DesignChoiceConstants.TEXT_CONTENT_TYPE_HTML);
textItem.setContent("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
9TXL0Y4OHwAAAABJRU5ErkJggg==");
this.reportDesign.getHandle().getBody().add(textItem);</pre>
</div>
<p> </p>
Find more posts tagged with
Comments
There are no comments yet