Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Crosstab Repeat Group on Page Break
juan436585
This seems like it would be an easy fix so maybe I am just missing a setting somewhere. In my crosstab I have a group that is rather large and spans more than one page and for the next page it just shows it as blank. I would like to repeat the group if there is a page break rather than showing a blank.
So for example, if I have something like a Date group in my cross tab and there is a lot of data for one of the days then it would be:
06/07/2010 data1 data2 data3
data1 data2 data3
data1 data2 data3
Then on next page it would be:
data1 data2 data3
data1 data2 data3
Instead of it being blank, I want 06/07/2010 to repeat on next page. I hope i explained that well enough as i dont think this will format correctly when published to the forum.
Any suggestions?
Find more posts tagged with
Comments
mwilliams
Hi juan436585,
What is your BIRT version? Do you start each date on its own page in the report as it is? Or is this date that is split just at the end of one page and the start of the next? Let me know.
Jeezus
Hi,
I'm bringing this post back to actuality, since I have the same exact problem.
To give my answers to the previous questions, I could set a page break on my "dates", but it's not important, since some of them have so much data in lesser levels that it can't be fully displayed on a single page.
Therefore I need the equivalent of the value-repetition on each page from casual tables on crosstabs.
I am working on version 2.5.2.
Thanks in advance.
mwilliams
Hi Jeezus,
There is no real good way to achieve this. Here is an example of a way to do so by moving the outer dimension into the inner dimension area, using a page break interval to make sure that onPageBreak is called, then resetting a variable on the page break so you know when to show the outer dimension and when to hide it.
Hope this helps. The best thing to do would be to log a bug/request an enhancement for this to work correctly in PDF.
http://www.birt-exchange.org/org/resources/bug-reporting/
Jeezus
Thanks for the trick. Unfortunately, there are too many drawbacks involved to use it this way : too hard to get convienient sub-totals, and about no way to define correct borders.<br />
So I was wondering (but since you didn't talk about it I have no big hope about that) if there were an equivalent of the "onPageBreak" method WITHIN a high-level group row cell that would allow me to duplicate my cell value, within itself, on each page break.<br />
<br />
Since the answer is probably "no", I'd like to explain that I first tried to achieve all of this with a normal table and page breaks. But I have to major issues :<br />
<ul class='bbc'><li>Undropped cells from group header still exist, and can't be really hidden, even more in excel output format</li><li>I noticed a painful bug which I haven't found yet in bugzilla : some times (I think it has something to do with a page break happening), a cell right under a dropped cell will be "forgotten" on its row, therefore the rest of the cells will be pushed on the left, and all the line cells will be misplaced (I even noticed that on your crosstab example, I still don't know how that managed to happen - see screenshot attached).</li></ul>
So if you know a way to achieve that, with either tables or crosstables, I'm interested
<br />
<br />
Thanks again.
mwilliams
Ah, I had only looked in PDF. The issue is where I'm setting a cell to "no display". If I put this back to "block", it looks as expected in the viewer as well.
Will your table have dynamic column amounts? Or will you know the column values?
Jeezus
I will have static columns, I know them, since I first tried to do this with a simple table.<br />
<br />
I am currently working on a simulation of drop behavior (in a simple table). I am using a script based on yours (the "i" variable set to 1 on page break ; I'm adding a similar variable defined in "onRender" to detect group change within a page, based on the difference between the current value of my cell and the previous value). I've got javascript issues about when the variables are defined or not (I'm not a javascript developer). I could use some help here too
<br />
<br />
I'll add the code since it's not that big. In my data (in my group header), I have :<br />
<br />
- onRender : <br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if(oldValue== null) {
oldValue= this.getValue();
newLine= true;
} else {
newValue= this.getValue();
if(oldValue!= newValue)
newLine= true;
else newLine= false;
oldValue= newValue;
}</pre>
<br />
- onPageBreak :<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>newPage = true</pre>
<br />
- Visibility criteria :<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if(newPage== null) false;
else {
if(newPage) {
newPage= false;
false;
} else !newLine;
}</pre>
<br />
Hope this helps.
mwilliams
I would do your onRender script in the onCreate script, I think. If you reproduce what you're got with the sample database, I can see exactly what you're doing and we can both work with the same file.
Jeezus
I've tried to summerize all my work on this subject on this sample report. Please study it. N?3 is my implementation of your example, I can't achieve it. N?4 is my best try so far.
Note : the report is designed in 2.6.1
mwilliams
If the page break inside is set to avoid for each of the groups in your #4, does this make it work as you're expecting. That is the only change I made to it.
Jeezus
--- Message duplicate ---
Jeezus
Hi again. Thanks again
<br />
A "page break avoid" behavior won't make it, since I justcan't avoid every page break in my own reports.<br />
I've worked on it again. I have two issues remaining on the try n?4 :<br />
<ul class='bbc'><li>One is "resolved" but I just don't understand my own solution : I have a problem of a data displayed twice per page (look at the data "State" behavior), despite the value of the boolean "showState". I resolved it on the data "Country", but not with a boolean, with a token (three different values). This solution is WEIRD. If you have any better solution I'm all open.</li><li>I never achieved to display a data on a total row if it is the first to be shown on the page, even if I duplicate the data on the rows, give them their own triggers on pageEnd or pageBreak... nothing worked.</li></ul>
<br />
And by the way, on solution n?3, this time you just hid the higher levels, but on YOUR example you did remove the cells, how did you do that ?<br />
<br />
Thanks again.
mwilliams
If you go to the cell you want to remove, go to the property editor, go to the advanced section, then to the section section, and set the display value to "no display", it'll remove the cell. This helps in XLS, but in the web viewer output, it helped to not do this...could be something to be able to change depending on the output format.
Avinash02
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="69069" data-time="1286314401" data-date="05 October 2010 - 02:33 PM"><p>
Hi Jeezus,<br />
<br />
There is no real good way to achieve this. Here is an example of a way to do so by moving the outer dimension into the inner dimension area, using a page break interval to make sure that onPageBreak is called, then resetting a variable on the page break so you know when to show the outer dimension and when to hide it.<br />
<br />
Hope this helps. The best thing to do would be to log a bug/request an enhancement for this to work correctly in PDF.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/org/resources/bug-reporting/'>http://www.birt-exchange.org/org/resources/bug-reporting/</a><br
/></p></blockquote>
<br />
<br />
Hi michael,<br />
<br />
I want to know , how exactly u have done this ?? i mean "How to remove Databinding (without error)??"<br />
as i have tried to remove it with both option (when removing BIRT ask "Do you want to remove unused databinding YES/NO") but its showing an error "Retrieving binding data error."<br />
<br />
i have modified ur report - TestReport.rptdesign (kindly find the attached)<br />
Also a screen shot in which i have circle that particular Binding which i want to remove<br />
<br />
i want the output as the report is showing now (the databinding in the red circle i have done its width "0%" so not showing in the preview or web viewer output)<br />
<br />
but when converted into excel(XLS MS 2007) shows that databinding Blank column .. i don't want this blank column So thought if removed from report then will not come in XLS.<br />
<br />
if any solution or suggestion please let me know..<br />
My birt Version is 2.5.2<br />
<br />
Thanks And Regards,<br />
Avinash