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)
import element from library using code
isl01jbe
Dear all,<br />
<br />
I am defining a cover page to be automatically added to all reports upon runtime. For this purpose, I have a common report library with a grid defined. I want to programatically add this grid to all reports using an event handler. <br />
<br />
My event handler does the following:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
try {
GridHandle newElement = reportContext.getDesignHandle().getElementFactory().newGridItem("DetailsGrid");
newElement.setExtends(reportContext.getDesignHandle().getLibrary("CommonLib").findElement("DetailsGrid"));
int slotID = reportContext.getDesignHandle().getBody().getSlotID();
reportContext.getDesignHandle().addElement(newElement,slotID, 0);
} catch (Exception e) {
e.printStackTrace();
}
</pre>
<br />
No exception is thrown, but the report comes up empty. I am using BIRT 3.7.1<br />
<br />
Any suggestions?<br />
<br />
Best regards<br />
<br />
Jonas
Find more posts tagged with
Comments
There are no comments yet