petar.mitrovic Posted January 11, 2008 Share Posted January 11, 2008 Hi, I'll try to expose my problem as simplier as I can. Imagine that you have to make a report which displays activities of each department in a company with many of them. Data must be grouped by a few main departments - something like this: ------------------------------MainDepartment1 |------------------------------Department name | activities |------------------------------Department1.1 | 5 |------------------------------Department1.2 | 6 |------------------------------Department1.3 | 4 |------------------------------MainDepartment1 |------------------------------Department name | activities |------------------------------Department2.1 | 7 |------------------------------... My problem is table header: ------------------------------MainDepartment1 |------------------------------Department name | activities |------------------------------ It should appear each time main department switches and at the top of new page. So I am placing it in my reports page header and group header. But the problem is when new group starts on a new page - my report displays 2 headers. I tried to use scriptlets, but I've got lost in them. Any ideas... I'm listening. Link to comment Share on other sites More sharing options...
svenn Posted January 11, 2008 Share Posted January 11, 2008 You could get rid of the page header and use just group headers. You could then set your group to start on a new page when the group changes. The drawback to this approach is that you can end up with a lot of blank area when you have groups with not a lot of data. Link to comment Share on other sites More sharing options...
petar.mitrovic Posted January 14, 2008 Author Share Posted January 14, 2008 I already tried this, but as you suggested - there was a lot of empty space. What I tried is using scriplets. I used a variable which says what is page header department id, and then used it in "print when" field of group header - if it is same, group header should not be displayed. I used afterPageInit() method to set variable value, but something was going wrong, because group header was shown even then. I feel I'm close to solve this, but I could still use some help. Link to comment Share on other sites More sharing options...
svenn Posted January 15, 2008 Share Posted January 15, 2008 If you find a solution please post it. We've run into this with several of our report and have either accepted that we will have two headers on occasion or blank spaces. Link to comment Share on other sites More sharing options...
petar.mitrovic Posted March 5, 2008 Author Share Posted March 5, 2008 As it ususally happens, I solve this problem by an accident when it was the last thing on my mind.I was working on a report that required some group manipulation. While creating a group i noticed checkbox "Print header on each page".So simple and on the other hand so difficult. Regards,Petar. 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