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
Modify grid content in onCreate event
Migrateduser
Hello,<br />
<br />
I need to modify the content (not the design) of a grid from an onCreate java event handler, but I can only modify the content from the onPrepare event. This is the code. Any suggestions? Thanks!!!<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
ReportDesignHandle design = reportContext.getDesignHandle();
GridHandle gridHandle = (GridHandle) design.getElementByID(1326);
for (int i=0;i<12;i++){
for (int j=0;j<31;j++){
RowHandle row = (RowHandle) gridHandle.getRows().get(j+1);
CellHandle cell = (CellHandle) row.getCells().get(i+1);
SlotHandle slot;
try {
slot = cell.getContent();
} catch (Exception e) {
throw new RuntimeException("Error during adding content to cell", e);
}
DesignElementHandle deh = slot.get(0);
LabelHandle label = (LabelHandle) deh;
try {
label.setText(String.valueOf(ausencias[i][j]));
} catch (SemanticException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
</pre>
Find more posts tagged with
Comments
There are no comments yet