<p>Hi All,</p><p> </p><p>I am trying to fetch data from rptDocument. I a, using the example posted here: <a data-ipb='nomediaparse' href='
http://www.eclipse.org/birt/phoenix/deploy/reportEngineAPI.php'>http://www.eclipse.org/birt/phoenix/deploy/reportEngineAPI.php</a> .</p><p> </p><p>I am able to fetch the Table or column headings but not any of the data. Following is my code snippet:</p><p> </p><div>//Open previously created report document</div><div>IReportDocument iReportDocument = engine.openReportDocument("c:/work/test/DetailedProductReport.rptdocument");</div><div> </div><div>//Create Data Extraction Task<span> </span></div><div>IDataExtractionTask iDataExtract = engine.createDataExtractionTask(iReportDocument);</div><div> </div><div>//Get list of result sets<span> </span></div><div>List<IResultSetItem> resultSetList = (List)iDataExtract.getResultSetList( );</div><div>System.out.println(" resultSetList :"+resultSetList.size());</div><div>if(resultSetList!=null && resultSetList.size()>0){</div><div>for(IResultSetItem resultItem: resultSetList){</div><div>String dispName = resultItem.getResultSetName( );</div><div>iDataExtract.selectResultSet( dispName );</div><div> </div><div>IExtractionResults iExtractResults = iDataExtract.extract();</div><div>IDataIterator iData = null;</div><div>try{</div><div>if ( iExtractResults != null )</div><div>{</div><div>iData = iExtractResults.nextResultIterator( );<span> </span></div><div>int columnCount = iData.getResultMetaData().getColumnCount();</div><div>for(int i=0;i<columnCount;i++){</div><div>System.out.println("Column "+i+" :"+iData.getResultMetaData().getColumnLabel(i));<span> </span></div><div>}</div><div>if ( iData != null ){</div><div>while ( iData.next( ) )</div><div>{<span> </span></div><div>Object objColumn1;</div><div>try{</div><div>objColumn1 = iData.getValue(0);</div><div>}catch(DataException e){</div><div>objColumn1 = new String("");</div><div>}<span> </span></div><div>System.out.println( "Data: "+objColumn1 + " !! " );</div><div>}</div><div>iData.close();</div><div>}</div><div>}</div><div>}catch( Exception e){</div><div>e.printStackTrace();</div><div>}<span> </span></div><div>}</div><div>}</div><div>iDataExtract.close();</div><div> </div><div> </div><div> </div><div>resultSetList size is one . When I do iData.next there is nothing. I also tried getting iData.getValue(0) without even doing .next but that returns nothing. So is anything wrong with the code. I am also doubting my rptDocument is valid or not. Any suggestions would be helpful!!!</div><div> </div><div>-Thanks.</div>