I have a rptdesign with a single cell containing one data element and one label element.
The xml looks like this.
<cell id="131">
<data id="167">
<property name="resultSetColumn">storageSystem</property>
</data>
<label id="215">
<text-property name="text">KBB</text-property>
</label>
</cell>
I am using the logic explained in this
http://wiki.eclipse.org/Data_Extract_(BIRT)_2.1 to extract the output of the report.
//Open the rptdocument
IReportDocument rptdoc = engine.openReportDocument("C:/temp/BIRT/acceptandorder.rptdocument");
//Create the data extraction task
IDataExtractionTask iDataExtract = engine.createDataExtractionTask(rptdoc);
ArrayList resultSetList = (ArrayList)iDataExtract.getResultSetList( );
//Get the first result set. Note this is a table elemenent
IResultSetItem resultItem = (IResultSetItem)resultSetList.get( 0 );
String dispName = resultItem.getResultSetName( );
iDataExtract.selectResultSet( dispName );
IExtractionResults iExtractResults = iDataExtract.extract();
IDataIterator iData = null;
if ( iExtractResults != null ) {
iData = iExtractResults.nextResultIterator( );
if ( iData != null ){
while ( iData.next( ) ) {
//Just display the first two columns
Object objColumn1;
Object objColumn2;
try{
objColumn1 = iData.getValue(0);
} catch(DataException e) {
objColumn1 = new String("");
}
So, in this example with the output of getValue(0) I am getting the value in the first element of the cell (i.e., data). How should I get the value of label.
Also, How can I retrieve the cell value if there are 2 data elements in a cell.( the xml looks in this way)
<cell id="131">
<data id="167">
<property name="resultSetColumn">storageSystem</property>
</data>
<data id="168">
<property name="resultSetColumn">storageId</property>
</data>
</cell>