I want to insert dynamic text box to a cell in table via script of the cell. I searched in documentation and SO but all I found was how to insert text to dynamic text but not the dynamic text box itself.
Is that possible, and how?
Also, is it possible to add data in this place inside the dynamic text from dataset?
EDiT
what I have tried so far: having errors when using the nested loop here: Can you help understand why it gives an error? TypeError: Cannot call method "getCells" of null The output is as expected though.
importPackage( Packages.org.eclipse.birt.report.model.api );
elementFactory = reportContext.getDesignHandle().getElementFactory()
var mytable = reportContext.getDesignHandle().findElement("tblC");
//var mydetail = mytable.getDetail( ).get( 0);
for ( var i=1;i<23;i++){
for (var j=1;j<13;j++){
//get first detail row
mydetail = mytable.getDetail( ).get(i);
//get first column
var tcell = mydetail.getCells( ).get( j );
var mylabel = elementFactory.newLabel( null );
mylabel.setText( "hello" );
tcell.getContent( ).add( mylabel );
}
}