2006 IR Open Discussion Posted August 20, 2006 Share Posted August 20, 2006 By: JInish Abraham - jinish Show "No records" if no records are fetched 2003-11-26 00:41 Hi Teodore, I have a requirement of showing a text "No records found" on a report if no data is fetched. I need to keep the column headers as it is Can it be done using Jasper reports ? Thanks, Jinish By: Sunil - sunil_cet RE: Show "No records" if no records are fetched 2003-11-26 01:32 In our project we resolved the issue in this way. In the report properties say whenNoDataType="BlankPage" . You can do this through Irpeort this way . Goto View->ReportProperties menu go to More tab Set WhenNoDataType to Nopages. During report generation process, after creating the JasperPrint Object but before exporting it to PDF/HTML file check for the number of pages using JasperPrint:getPages() method. If it is zero, then throw an Exception back (to UI) saying the given selection criteria returned no result. UI will catch this exception and will display the appropriate error message. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now