Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Exception is thrown when there is no data retreived from query
RepBIRT
When we run the report and the data set doesn't have any records, it throws exception. Kindly let me know how to handle this
Find more posts tagged with
Comments
RepBIRT
When we run the report and the data set doesn't have any records, it throws exception. Kindly let me know how to handle this
mwilliams
What is your database type?
RepBIRT
Its DB2
and kindly let us know how to handle this exception
mwilliams
Can you post the error? Are you doing any computed columns or anything like that? The only time I've seen an exception caused by 0 results returned was with a text file source that didn't include column names if it was empty, which caused an exception. To get around this, I connected to the file in script and checked the size, in the beforeFactory or initialize and then dropped the table that used the dataSet so that the dataSet was never executed, which avoided the exception.
RepBIRT
The exception is,
Cannot fetch the next data row.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot move down to next row in the result set.
SQL error #1:Invalid operation: result set closed
;
com.ibm.db2.jcc.c.SqlException: Invalid operation: result set closed (Element ID:239)
odaconsumer.CannotFetchNextRow ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: Cannot fetch the next data row.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot move down to next row in the result set.
SQL error #1:Invalid operation: result set closed
mwilliams
Maybe this will help.
http://www-01.ibm.com/support/docview.wss?uid=swg21461670