Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
dataSet.getColumnMetaData().getColumnName(): ArrayIndexOutOfBoundsException
isl01jbe
Hi All,
I have implemented a dataset event handler for a report:
public class DataSetHandler extends DataSetEventAdapter
The event handler is used to output the column names of the dataset, according to
IColumnMetaData metaData = dataSet.getColumnMetaData();
mColumnCount = metaData.getColumnCount();
for(int i = 0;i < mColumnCount;i++) {
System.out.println(metaData.getColumnName(i));
}
getColumnCount() returns 8 (correctly), but getColumnName(i) throws an ArrayIndexOutOfBoundsException
While debugging, I see that the columnCount variable of the ResultMetaData class is -1 and yet 8 is returned for the getColumnCount.
Any clue on how to work around this or if a fix is available?
Best regards
Jonas Bergstrom
Find more posts tagged with
Comments
mwilliams
What is your BIRT version?
isl01jbe
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="99146" data-time="1334641413" data-date="16 April 2012 - 10:43 PM"><p>
What is your BIRT version?<br /></p></blockquote>
<br />
BIRT 3.7.1