Home
Developing Analytics Applications
Add rows dynamically to Grid [via script]
system_migrated
<p>Hello</p><p> </p><p>I am trying to create a birt report that is generated dynamically based on certain data. The report has the following structure.</p><p> </p><p>Body</p><p style="margin-left:40px;">Grid - main</p><p style="margin-left:80px;">Grid - data_grid</p><p style="margin-left:80px;"> </p><p>I am trying to dynamically add rows to the data_grid. Researching, I managed to piece together this code, which i put in the on create method of the main- Grid (of which its not working). Please could you assist.</p><p> </p><div><pre class="_prettyXprint">importPackage (Packages.org.eclipse.birt.report.model.api);grid = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("data_grid");elementFactory = reportContext.getReportRunnable().designHandle.getElementFactory();rowParm = new RowOperationParameters(2,-1,1);grid.insertRow(rowParm);tblCell = grid.getCell(1,0);label = elementFactory.newLabel("tblCell");label.setText("Startdate");tblCell.getContent().add(label);</pre></div><p> </p>
Find more posts tagged with
Comments
There are no comments yet