Binding of dynamically added columns
Hi all,<br />
I need to create a table with one column optional and not displayed if the property is empty for all the items in the table. The rest of the table is from the palette. I adapted the code from the link below:<br />
<a class='bbc_url' href='http://digiassn.blogspot.com/2007/11/birt-dynamic-adding-tables-and-columns.html'>http://digiassn.blogspot.com/2007/11/birt-dynamic-adding-tables-and-columns.html</a><br />
<br />
I only kept the following snipet and placed it in the "initialize" event handler:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>elementFactory = reportContext.getReportRunnable().designHandle.getElementFactory();
dynamicTable = reportContext.getReportRunnable().designHandle.findElement("table");
dynamicTable.insertColumn(6, 1);
myNewRow = dynamicTable.getDetail().get(0);
addedCell = myNewRow.getCells().get(5);
label = elementFactory.newLabel("comment");
addedCell.getContent().add(label);</pre>
<br />
I managed to add the extra-column, though I can't figure out a way to bind this column to my scripted data set.<br />
<br />
Any help accepted.<br />
Thanks!
I need to create a table with one column optional and not displayed if the property is empty for all the items in the table. The rest of the table is from the palette. I adapted the code from the link below:<br />
<a class='bbc_url' href='http://digiassn.blogspot.com/2007/11/birt-dynamic-adding-tables-and-columns.html'>http://digiassn.blogspot.com/2007/11/birt-dynamic-adding-tables-and-columns.html</a><br />
<br />
I only kept the following snipet and placed it in the "initialize" event handler:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>elementFactory = reportContext.getReportRunnable().designHandle.getElementFactory();
dynamicTable = reportContext.getReportRunnable().designHandle.findElement("table");
dynamicTable.insertColumn(6, 1);
myNewRow = dynamicTable.getDetail().get(0);
addedCell = myNewRow.getCells().get(5);
label = elementFactory.newLabel("comment");
addedCell.getContent().add(label);</pre>
<br />
I managed to add the extra-column, though I can't figure out a way to bind this column to my scripted data set.<br />
<br />
Any help accepted.<br />
Thanks!
0
Comments
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 145 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management