cooperbry Posted March 1, 2010 Share Posted March 1, 2010 Hello helpful people out there. I have a report that specifies a noData section. I also have a printWhenExpression that might exclude all data from the resulting report. I would like to have the noData section appear if this condition occurs (that is, no data is displayed as a result of the printWhenExpression expression). Is this possible? Link to comment Share on other sites More sharing options...
cooperbry Posted March 29, 2010 Author Share Posted March 29, 2010 Unfortunately, I solved this by creating a counter variable inside the jrxml file. It felt a little bogus having to do that, but, it seemed to have worked. I added an expression that printed "No Data" when all rows were supressed. I'll add a project request if I can figure out how...Post Edited by cooperbry at 03/29/2010 10:23 Link to comment Share on other sites More sharing options...
cooperbry Posted March 31, 2010 Author Share Posted March 31, 2010 Here's a bogus test report that uses variables. You can use the variables to display a "No Data" message. It works... Link to comment Share on other sites More sharing options...
dnvsrikanth Posted April 7, 2010 Share Posted April 7, 2010 Hi cooperbry, No need to have counters and all the other stuff. Simply set whenNoDataType attribute to "allSectionsNoDetail" and in the Summary band Have a Text Field that displays "No Data Found" and in its printWhenExpression use the following expression: DNV SrikanthCode:new java.lang.Boolean($V{REPORT_COUNT}.intValue()==0) Link to comment Share on other sites More sharing options...
cooperbry Posted April 7, 2010 Author Share Posted April 7, 2010 thanks Link to comment Share on other sites More sharing options...
cooperbry Posted April 9, 2010 Author Share Posted April 9, 2010 ====================================================================== Date Submitted: 03/29/2010 10:29Last Modified: 04/09/2010 11:35====================================================================== Summary: whenNoDataType and printWhenExpressionDescription: If a printWhenExpression is added to the detail band of a report and allrows are suppressed based on the printWhenExpression during the reportexecution, the noData section is not displayed. It would be nice if Jaspercould detect that and display the noData section.====================================================================== ---------------------------------------------------------------------- (0009001) lucianc (administrator) - 04/09/2010 11:35 ---------------------------------------------------------------------- The whenNoDataType attribute refers to the report dataset, while the detailband is a layout item. Those are conceptually different things, henceusing the noData band when the detail band doesn't print doesn't make sensein my opinion.If you want to filter records from the report data source, use thereport's filter expression. The noData band will print when all recordsare filtered.I'm closing this as invalid. Reopen if you have additional arguments.Regards,Lucian 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