stavros_mrg Posted July 12, 2023 Posted July 12, 2023 Hello everyone, I need to tackle the following issue. I have a Group Header with Footer, and a Column Footer. In the Group Footer there is a subreport. The report is printed in multiple pages and when the Group comes to the end the Footer with the subrerport is printed, too. Now, i want the Group Header and Column Footer to be printed only in the pages before the subreport is printed. In other words, in the page where the Subreport is printed i don't want to see the Group Header and Column Footer. I have managed to solve this only for the Column Footer, using a return value ($V{FooterLvl2_} - integer) which returns the value '1' in the page of the main report which prints the subreport. In all other pages is null. Then, in the print when expression of the Column Footer, I type $V{FooterLvl2_}.equals( 1 )==false. It worked! However, the same expression for the Group Header it doesn't work. The same return value is always null there. I ve tried with all Reset Types but no joy. Any suggestions?
Mehak Rajkumar Posted July 13, 2023 Posted July 13, 2023 Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit https://support.tibco.com/s/ for direct access to our technical support teams offering guaranteed response times.
Jivan Phadtare Posted July 13, 2023 Posted July 13, 2023 Hello,Kindly try with below and check it. 1. Create a variable: First, create a variable in your main report to track whether the subreport has been printed on the current page. Let's call this variable "subreportPrinted" and set its initial value to false. The variable will be used to determine the visibility of the Group Header and Column Footer.2. Update the subreport: In the subreport, create a variable to set the "subreportPrinted" variable in the main report to true when the subreport is printed. Make sure this variable is evaluated on each page.3. Configure the Group Header: In the Group Header band properties, set the "Print When Expression" to $V{subreportPrinted} == false. This will hide the Group Header when the subreport has been printed.4. Configure the Column Footer: In the Column Footer band properties, set the "Print When Expression" to $V{subreportPrinted} == false. This will hide the Column Footer when the subreport has been printed. Hope this will help you to tackle your problem.
stavros_mrg Posted July 20, 2023 Author Posted July 20, 2023 Hello jphaptar and tank you for your reply. Finally, i managed to tackle the issue with a combination of the issue you provided and page breaks. Thank you very much!
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