siyabonga.bushula Posted January 24, 2022 Share Posted January 24, 2022 Hi I have a Jasper report with a sub report now I want the report to display the data only if there's data on the sub-report hence the details are from the sub-report only headers from the mainI created a variable which is a 1 or 0, when this variable is 1 it means there's a data to display so I set the print when to " $V{Variable_1}.equals(1) " and it comes with a blank report I would appreciate if someone could help Link to comment Share on other sites More sharing options...
yama818 Posted January 26, 2022 Share Posted January 26, 2022 I can't see the jrxml file, so I'm guessing.It is possible that the calculation timing of 'Variable_1' and the comparison timing are out of sync.Changing the 'ResetType' of 'Variable_1' may help. Link to comment Share on other sites More sharing options...
siyabonga.bushula Posted January 27, 2022 Author Share Posted January 27, 2022 Link to comment Share on other sites More sharing options...
yama818 Posted January 27, 2022 Share Posted January 27, 2022 If your requirement is not to display the group header itself when there is no data, then you can control it more easily.Set 'Print When Exception' to '$V{COLUMN_COUNT} > 0'. Link to comment Share on other sites More sharing options...
siyabonga.bushula Posted January 31, 2022 Author Share Posted January 31, 2022 Hi Yama, thanks a lot but I'm not winning see the attached screenshts Link to comment Share on other sites More sharing options...
yama818 Posted February 3, 2022 Share Posted February 3, 2022 My last reply was wrong.This did not fulfill your requirement.I'm very sorry.And after that, I tried many things by trial and error.But unfortunately I could not get 'v_check' properly.Sorry for not being able to help you. 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