Jump to content

How to check if the result set of jasperReport does not return data


NOjeil

Recommended Posts

Dear All ,

I am calling the following code in order to get the jasperPrint object from the jasperReport
         jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, connection);
My question is how to check if the resultSet of the jasperReport returned data or no
Note the report may contains header , footer and labels so i can not check the pages size of the jasperPrint object

Thank you in advance,

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 weeks later...

Thank you abhimanyu.prasad ,but the attribute 'AllSectionsNoDetail' will not help me in my case since the detail band can contains data  ,images , table headers and all these elements will appears if the report query does not return data
I fixed it by adding a property to the japserDesign fields and when getting the jasperPrint  I looped it to check if this property exists for a jasper Print element, if it exists it means that the query of the report returns data else the report query does not return data

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...