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)
How to stop error messages when no rows in dataset
richie.riviere
<p>Hi,</p>
<p> </p>
<p>I have a BIRT report that has 4 datasets in it. Based on the report parameters I will always hide 3 of these datasets and always show 1.</p>
<p> </p>
<p>My report works without any issues when the data set that I show returns data. However if my dataset does NOT return any rows on any given execution I get errors at the bottom of the report.</p>
<p> </p>
<p>I've had this sort of thing before and to fix them I've always rolled back my changes until I could get the report back to a stable state and then work forward to re-implement the changes. I would rather not take this approach if I don't have to because I've made a lot of changes since I last checked in.</p>
<p> </p>
<p>Can someone help me to try and figure out what the issue might be with the report (i.e. what the errors are telling me) and how I could debug and fix.</p>
<p> </p>
<p>I have attached a screen shot of the errors in the report as well as a file containing the full stack trace of the report and also the report design file to this post to try and help someone help me.</p>
<p> </p>
<p>thanks</p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
richie.riviere
<p>On doing some more research it looks as if the problem described above is a bug in the BIRT engine code. I have two links to suggest this...</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://stackoverflow.com/questions/23496980/birt-report-exception-when-zero-results-returned-from-data-set-query'>http://stackoverflow.com/questions/23496980/birt-report-exception-when-zero-results-returned-from-data-set-query</a></p>
;
<div> </div>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/25127-exception-cannot-fetch-the-next-data-row/'>http://developer.actuate.com/community/forum/index.php?/topic/25127-exception-cannot-fetch-the-next-data-row/</a></p>
;
<p> </p>
<p>Can someone tell me in what version of BIRT this bug was fixed? I can't find any notes on the BIRT releases or bugs pages to indicate when it was fixed. Also can anyone tell me if the supposed work around of setting allowNextOnExhaustedResultSet=1 has worked for them? I've tried it and it doesn't seem to work.</p>
<p> </p>
<p>I am currently using BIRT Designer Version 4.3.1</p>
mwilliams
<p>What type of data set are you using? Your error doesn't seem to be the same as the one where the allowNextOnExhaustedResultSet workaround is suggested. Is this something you can reproduce with the sample database or a data source I can access to run and test on? Or is this only happening with your specific data source?</p>
richie.riviere
<p>I've spent some time today working back through my check ins to find out what differences I had between the last working version of my report and my current version which breaks when an empty dataset is returned.</p>
<p> </p>
<p>I've found the cause!!</p>
<p> </p>
<p>In an earlier post on this forum I reported a problem with my report sorting.</p>
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/35806-report-not-adhering-to-dataset-sorting/#entry132664'>http://developer.actuate.com/community/forum/index.php?/topic/35806-report-not-adhering-to-dataset-sorting/#entry132664</a></p>
;
<p> </p>
<p>The advice I got was to looks at an Advanced property on my table named 'Sort by groups' and set it to false. I did this and it fixed my sorting however when the resultset in empty I've now learnt that it also causes the errors I have posted.</p>
<p> </p>
<p>So now that we know the cause can anyone help me with a way to still have my sorting work correctly but also not have an error happen when the resultset is empty.</p>
<p> </p>
<p>thanks</p>
mwilliams
<p>One thing you could probably do would be to create a running count computed column in your data set and then sort your table by that field. This should put your items back in their original order vs the default ordering. Let me know if that works.</p>
richie.riviere
<p>Thanks for your suggestion. I implemented your solution with a slight variation and it worked for me. I now have both my sorting working and I don't get errors when the resultset is empty.</p>
mwilliams
<p>Great! Glad to help! Let us know whenever you have questions.</p>