Hi,
using Birt 2.6.2 I want with a Javascript, manually set data in a grid element outside onPrepare().
During the onCreate() of a Label I can change the value easily
During the onCreate() of a Grid I can't change the value of that Label.
But in the report I only see the initial text, set during onPrepare()
and not "MY NEW VALUE" set during onCreate().
Why is the changing of a label text only working in the onCreate of the Label and not in the onCreate of its Grid ?
regards
germobirt
using Birt 2.6.2 I want with a Javascript, manually set data in a grid element outside onPrepare().
During the onCreate() of a Label I can change the value easily
this.text = myVar;
During the onCreate() of a Grid I can't change the value of that Label.
var factory = reportContext.getReportRunnable().designHandle.getElementFactory(); var grid = reportContext.getDesignHandle().findElement("MyGrid"); for (var i = 0; i < myRows;i++) { row = grid.getRows().get(i); //RowHandle cell1 = row.getCells().get(1); //CellHandle slot1 = cell1.getContent(); //SlotHandle lbl1 = slot1.getContents() //LabelHandle Array? deh1 = slot1.get(0); //LabelHandle DesignElementHandle deh1.getText(); // Gets the initial value. Works! deh1.setText("MY NEW VALUE"); deh1.getText(); // Gets the new value. Works! logToDebugWindow(i + " : " + deh1.getText() ); // Shows the new value in a debug window );

But in the report I only see the initial text, set during onPrepare()
and not "MY NEW VALUE" set during onCreate().
Why is the changing of a label text only working in the onCreate of the Label and not in the onCreate of its Grid ?
regards
germobirt