Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Column Area Page Break in Crosstab not causing Group Header to repeat
getza1
I'm trying to design a report using a crosstab and I want have a header from a group show up everytime there is a horizontal page break caused by the column area of the crosstab.
In the example for year 2003 when there is a page break initiated by the column area, the header from the group doesn't show up. In year 2004 when there is a vertical page break, you then see the header from the group show up.
I looked at the source code for crosstabs for the 2.5.2 and the 2.6.0_M5 and noticed that in the ICrosstabEventHandler the onCrosstabPageBreak and onCellPageBreak methods have been commented out.
Is there a reason why they have been commented out? It looks like in the CrosstabScriptHandler the two methods were implemented but then they were commented out there as well.
Is there a way to have a horizontal page break in a crosstab cause a page break in a group? We would really like to have a header display that spans all the columns of the crosstab. The only way we saw to do this was to put it in the header of a group. Which works well when there is a vertical break, but doesn't seem to work at all when there is a horizontal break.
Any information would be greatly appreciated.
Thanks,
Aaron
Find more posts tagged with
Comments
mwilliams
Hi Aaron,
From what I can see in the attached PDF file, all of the crosstab headers are repeated on page break. Vertical and horizontal. Are you talking about the outer list header then, I'm assuming? You don't want to include the year in the crosstab header? Let me know.
Edit:
Looks like I should have read better. I skipped the paragraph about the year.
I'll see if I can find a way to get the year to repeat.
mwilliams
Aaron,
Take a look at the report with the year placed in the crosstab's upper left header. It repeats on pagebreak, whether it's horizontal or vertical. Since you used a second dataSet, I brought the value in from the outer list via a variable. I initialized it in the initialize script, stored the outer list value in the variable in the onCreate of the hidden data element in the list group header, then recalled the value in a dynamic text box in the crosstab's row dimension header area.
Hope this helps.
getza1
mwilliams,
That is close to what I'm looking for. I want that year header to span across all the columns though, instead of just being above the rows. I'm not sure if that is possible to do with a crosstab though.
Aaron
mwilliams
Aaron,
Is using the year as a dimension not an option? It repeats for page breaks and can be centered across the columns. Or are you wanting the year to repeat for each column? Let me know.
getza1
Michael,
I think that would work. I also found this example which does the same thing
http://www.birt-exchange.org/org/devshare/designing-birt-reports/855-crosstab-horizontal-page-break-example/
Every time I have tried that, the year shows up for every column. In your example and the one that is pasted above that is not the case. How do you get it to show up once and then span all columns? I noticed you centered the one in your example but the example I pasted above doesn't center it.
Thanks,
Aaron
mwilliams
Aaron,
In your example, it looked like you had deleted the "year" in the crosstab. In the example you originally posted, if you clicked on the icon in the column dimension area, you would have seen an option to hide/show groups. When you choose this, you could unselect the year, hit ok, then do the same thing only select year and it'll show back up in your crosstab. Then, you can just center the value using the property editor if you want to do so.
getza1
Michael,
Thanks for all of your help. I was able to get it working in our report design. That is exactly what we needed.
Do you know why when there is a column initiated page break in a crosstab it doesn't cause page breaks in the groups of the list?
We still have one more issue where we have two groups in the list that have headers that display and show when there is a new group or a page break. When the crosstab does a horizontal page break the headers are not shown. I'm thinking we might have to live with this one.
I did look at the source code for the crosstab report item and noticed the page break event logic is all commented out. Do you know why that might be?
Thanks again,
Aaron
mwilliams
Aaron,
For when you have 2 groups in your outer list, you could probably do something similar to the example where I stored the year from the list and displayed it in the crosstab, only you could put the value in a dynamic text element in the box where the year element is now.
As for the page break event being commented out, I would imagine that this is because it's not yet implemented to have the method for crosstabs. This may be something that is being worked on for later versions.
For the page breaks in the list for each group, you'll just need to open up the group editor and choose the "always" option for the "after" page break option.
Let me know if you have any questions.