Hi,<br />
<br />
New to BIRT and the Forum.<br />
<br />
I know this topic has been discussed a couple of times.<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/index.php/topic/16624-how-to-add-a-detail-row-to-tablehandle/'>16624-how-to-add-a-detail-row-to-tablehandle</a><br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/forum/index.php/topic/17109-rowoperationparameters/'>17109-rowoperationparameters</a><br />
<br />
Unfortunately I can't seem to get my rows to insert. My table is named configTable and I am inserting data from a data set retrieved from a DB. As the data from the data set is inserted into the rows of the table, (withtin the Row's onCreate event) I'm evaluating the data for specific criteria. When my condition is met I'm trying to insert a row but I'm getting the exception <br />
<br />
"Wrapped org.eclipse.birt.report.model.api.elements.SemanticError: The insert operation on the element "configTable" is forbidden."<br />
<br />
//within Report Design initialize event<br />
importPackage (Packages.org.eclipse.birt.report.model.api); <br />
<br />
//within configTable row onCreate event<br />
configTable = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("configTable");<br />
elementFactory = reportContext.getReportRunnable().designHandle.getElementFactory();<br />
row = this.getRowData();<br />
<br />
if ( condition ) {<br />
for ( x=0; x < rowsToCreate; x++ ) {<br />
rowParm = new RowOperationParameters(2, -1, tableRowCount);<br />
configTable.insertRow(rowParm);<br />
//myNewRow = configTable.getDetail().get(1);<br />
//tblCell = myNewRow.getCells().get(12);<br />
//label = elementFactory.newLabel("tblCell");<br />
//label.setText("test");<br />
//tblCell.getContent().add(label);<br />
<br />
tableRowCount++;<br />
} <br />
} <br />
<br />
tableRowCount is created and initialized in the configTable onPrepare event and is just a counter to help me keep track of where I am (there's probably a better way to manage that - I just haven' found it yet). If I understand the RowOperationParameters parameters, the third parameter is the nth detail row index to be added to the table? When I change the third parameter to anything greater that 1 I am getting the exception which makes me think I'm not using RowOperationParameters correctly.<br />
<br />
Any help or suggstions are appreciated. Thanks in advance,<br />
Rich