phantastes Posted June 13, 2011 Share Posted June 13, 2011 Hi!You can set the evaluation time of an element to a group. However it seems that the Print When expression is always evaluated now. This makes it impossible (?) to remove a row based on the values passed back from a subreport. There is a property called "net.sf.jasperreports.style.evaluation.time.enabled", that I'm guessing is handling this issue for style evaluation. Unfortunately there is not a "Print When" check for a style. Does anyone know if there is a way around this?Thank you!Magnus Link to comment Share on other sites More sharing options...
lknueve Posted June 13, 2011 Share Posted June 13, 2011 I've not seen this issue. Are you setting it at field level, band level, page level, report level? One thing I have noticed is that if I set it at say the variable level and put the variable in a text field and don't update the text field then it does the evaluation incorrectly - try looking at all the levels to see if there's one that is off? Link to comment Share on other sites More sharing options...
phantastes Posted June 13, 2011 Author Share Posted June 13, 2011 Hi,well it's only actual text element that has the Evaluation Time setting in my case. The text field displayes and evaluates fine, the issue is with the Print When expression that ignores the Evaluation TIme setting for the text field.Thanks for the reply though! Link to comment Share on other sites More sharing options...
lknueve Posted June 13, 2011 Share Posted June 13, 2011 Can you post an example of your report? The jrxml file? Link to comment Share on other sites More sharing options...
linden Posted April 19, 2014 Share Posted April 19, 2014 I found a way around it by creating a variable 'v1' with reset type 'report' and then setting its expression in java to $V{REPORT_COUNT} == 0 ? "" : "City" because in my example I needed to show/hide a header of a subreport when it had csv datasource data or not. Then I just replaced the header static text with a text field with value $V{v1} that gets evaluated at report time as well. Hope it helps Link to comment Share on other sites More sharing options...
Report Monkey Posted March 20, 2020 Share Posted March 20, 2020 Anyone found a solution to the original poster's problem?My problem is a little different. I'm trying to hide a page header based on the presence of a subreport, which is nested in a group footer. I think the real answer is to restructure the entire report. If a page header is conditional, the report should be broken into a new subreport and placed in an additional group footer. 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