Home
Analytics
JS chart is not rendered in HTML
Mayankk
<p>Hi,</p>
<p> </p>
<p>I am trying to create HTML report outside the viewer, but somehow not able to generate JS chart into it.</p>
<p>I am passing .rptdesign file as input to a function that generates html file and pass it to a remote requester. The rptdesign file has 2 JS charts and images in the report table, images are coming but charts are not coming in the generated html file.</p>
<p> </p>
<p><strong><em>However Viewer's Export Content > XHTML works fine, and it generates chart as svg image.</em></strong></p>
<p> </p>
<p>I am using iHub3.</p>
<p> </p>
<p>Following is the code that i have used for rendering option:</p>
<p> </p>
<div> HTMLRenderOption options = new HTMLRenderOption();</div>
<div> options.setOption(IRenderOption.HTML_PAGINATION, Boolean.TRUE);</div>
<div> options.setOutputFileName(outputFileName);</div>
<div> options.setOutputFormat("html");</div>
<div> // Adding images to html rendered report</div>
<div> String imageDir = new File(outputFileName).getName();</div>
<div> int htmlExtensionLength = "html".length();</div>
<div> options.setBaseImageURL(imageDir.substring(0, (imageDir.length() - (htmlExtensionLength + 1))));</div>
<div> options.setImageDirectory(outputFileName.substring(0, (outputFileName.length() - (htmlExtensionLength + 1))));</div>
<div> options.setImageHandler(new HTMLServerImageHandler());</div>
<div> options.setSupportedImageFormats("PNG;JPG;SVG");</div>
<div> </div>
<div>I have attached the zip file that is being generated. Pls let me know what else needs to be done. I tried finding code used by actuate's<strong><em> Export Content > XHTML but couldn't find. </em></strong></div>
Find more posts tagged with
Comments
mwilliams
<p>BIRT Designer Professional designs will not work properly if you use features that don't exist or differ in the open source engine. This is likely your problem. If you have an iHub, you can use the JavaScript API to integrate your BIRT content into your application.</p>