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)
dynamic column repetition
system_migrated
Hi,
I'm having a big problem with BIRT, and I don't find a solution... here it is:
I have a simple report that contains only a table.
My table has 7 big columns, so the width of my table is bigger than the page's width.
When I export my report to a .pdf file, it looks like this:
Page 1 :
Code :
+
+
+
+
+
+
| Column 1 | Column 2 | Column 3 | Column 4 | Column 5 |
+
+
+
+
+
+
Page 2 :
Code :
+
+
+
+
+
+
| Column 1 | Column 2 | Column 3 | Column 4 | Column 5 |
+
+
+
+
+
+
Page 3 :
Code :
+
+
+
| Column 6 | Column 7 |
+
+
+
Page 4 :
Code :
+
+
+
| Column 6 | Column 7 |
+
+
+
And the problem is that if I take the page 3 or 4, I will not be able to know which row is concerned, which row of the page 1 is continued on the page 3... that's why I would like to write again on page 3 and 4, the contain of the Column 1.
Anybody has an idea on how to proceed?
Find more posts tagged with
Comments
mwilliams
Hi Ykk_Jeff,
One simple thing you could do if it's always splitting in that same spot, is to just add another column between columns 5 & 6 and put the column 1 field in your table again.
Migrateduser
Hi
The problem is that the columns will be added dynamically (the number of columns displayed might change), and the content will change, so it won't split always in the same spot
mwilliams
Ykk_Jeff,
The only thing I could think of then off the top of my head would be to size your columns to a specific size, then in your code to add dynamic columns you'd know when/if you'd need to add the extra column. If you were using a crosstab, they have a horizontal page break option with a header repeat option since they have actual row headers.
Migrateduser
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>
If you were using a crosstab, they have a horizontal page break option with a header repeat option since they have actual row headers.</p></blockquote>
<br />
I had another idea: to duplicate the column 1 and to hide it, then on PageBreak event for the table, to set this duplicated column to visible.<br />
<br />
I don't know if that could work... I tried to do that this morning, but I wasn't able to set the column visible using the "onPageBreak()" event
Migrateduser
Ooops, I forgot to say : I use a simple table, not a crosstab...
mwilliams
Ykk_Jeff,
The pagebreak event is called when the page break interval or a forced page break are encountered. I don't know if it's called when a table runs off the side of the page to another page. That could be the issue in this case.
Migrateduser
Well, I tried to do "this.getStyle().backgroundColor = "black";" on a "onPageBreak" event, but I received this message :
"the content is read only in onPageBreak script."
So I guess I will not be able to set visible a column on a onPageBreak event... I don't see any solution to my problem
Migrateduser
A solution to my problem would be:
1) Get the size of my table
2) if the size is bigger than the page's size : insert the column to repeat between the last column of page 1 and the first column of page 2 (in the example).
To do this, I need to know:
- when is it possible to know the size of my table? Is it possible after rendering the table?
- is it possible to insert a column in the table AFTER the generation of the table
Do somebody have an answer?
mwilliams
Ykk_Jeff,<br />
<br />
This is why I suggested using fixed column widths so you'd know how many columns you could fit onto a page. This might be the best solution.<br />
<br />
Another thing you could do would be to request an enhancement to repeat a certain column when a standard table must page break because of width. You could do something like that at <a class='bbc_url' href='
http://www.birt-exchange.org/bug-reporting/'>Report
Bugs - BIRT Exchange</a>.<br />
<br />
Hope this helps.
pppankaj
Hello Guys,
I need your guidance in resolving below issue. Currently my report is displaying fields similarly below
TICKET1 TICKET_DATE TICKET2 DUP TYPE
ABC 2010-02-01 CDE CLOSE MATCH
CDE 2010-02-01 ABC CLOSE MATCH
I want to avoid such sort of redundant rows as when TICKET1 (ABC) is already compared with TICKET2 (CDE), vice-versa should not be happened.
Is there any way in BIRT scripting that could be handled?
regard
Pankaj
Migrateduser
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>Ykk_Jeff,<br />
This is why I suggested using fixed column widths so you'd know how many columns you could fit onto a page. This might be the best solution.<br />
Hope this helps.</p></blockquote>
<br />
The problem is that I cannot use fixes column, because the data in the column may be variable (I have a column "comments", that allows the user to write a comment with no limits...)
<br />
<br />
I will ask for an enhancement...<br />
<br />
Thank you for your time
mwilliams
Ykk_Jeff,
After you submit the enhancement request, be sure to put the request info in here so that other that happen upon this thread can vote for your enhancement request.
Migrateduser
Hmm this is the bug#313294, but I don't see it in my request... I may have done this wrong
mwilliams
I was not able to locate the enhancement request with that number. Did they send you an email confirmation?
Migrateduser
No, I didn't received an e-mail confirmation
Migrateduser
This is the link to the bug : <br />
<a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=313294'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=313294</a><br
/>
<br />
I just typed 313294 in the search field...
mwilliams
Hmmm. That's what I had done. Maybe it just wasn't quite in there for search yet when I did.
Thanks for the update!
Migrateduser
No problem, I'm glad that this works now
Do you have any idea about the time it takes to them to look at the bug and give an answer?
mwilliams
I'm not sure on an exact timeline. It varies, but shouldn't be long though til you hear something.
Migrateduser
Ok, that's good news
Thank you
!