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 check whether the Resultset of a query is null?
s_shetty
Hello everyone,
I m quite new to BIRT Report Designing. I am developing a web application where in the report is generated based on the parameters selected by the user in a jsp page.In my application, the query which is used to generate the report may result in an empty resultset.My requirement is whenever the resultset is empty, the user should not see the empty report but should be redirected to a web page with an appropriate message . Can someone please suggest me a way to do this?
Thanks & Regards,
Shreya Shetty
Find more posts tagged with
Comments
thuston
The redirect would be quite complicated.
You can put the message in your reports very easily.
Add a 'No Data Found for Given Parameters' Label to the Header of the Table displaying the DataSet.
Then give this label a Visibility hide expression of row.__rownum >= 0. If there are no rows it returns -1 and the label will appear.
LeinadJan
<blockquote class='ipsBlockquote' data-author="'s_shetty'" data-cid="66455" data-time="1279186929" data-date="15 July 2010 - 02:42 AM"><p>
Hello everyone,<br />
<br />
I m quite new to BIRT Report Designing. I am developing a web application where in the report is generated based on the parameters selected by the user in a jsp page.In my application, the query which is used to generate the report may result in an empty resultset.My requirement is whenever the resultset is empty, the user should not see the empty report but should be redirected to a web page with an appropriate message . Can someone please suggest me a way to do this?<br />
<br />
Thanks & Regards,<br />
Shreya Shetty<br /></p></blockquote>
<br />
The easiest thing to do is inside your JSP page. Create a query that will tell you if you have data or not, if you have data, show the report, if not, redirect somewhere else. Or like thuston said, show the message in your report.
s_shetty
thuston & LeinadJan,
Thanks for the reply
, I followed the method suggested by thuston & it works fine.