Home
Intelligence (Analytics)
hot to set width of dynamic crosstab columns (birt 2.6)
tis
Hi,<br />
<br />
I have a report containing a crosstab with the following structure.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
| | Level 1 |
| | Level 2 | Level 2 |
| Header 1 | Header 2 | H 3 | L 3 | L 3 | L 3 | L 3 | L 3 |
| Value 1 | Value 2 | V 3 | x | x | | | |
| Value 1 | Value 2 | V 3 | x | x | x | | x |
| Value 1 | Value 2 | V 3 | | | | x | |
</pre>
<br />
I have assigned a width of 7mm to the following cells because their data contains only check marks or short numbers.<br />
Header area - H 3<br />
Row area - V 3<br />
Column area - L 3<br />
Detail area is set automatically to 7mm as soon as I change the width of the column area<br />
<br />
The problem I have with this setup is that the number of dynamic columns is between 2 and about 50. If the report contains at least 5 dynamic columns the column headings of Level 1 and Level 2 look fine, if the number of columns is less the header text gets cut off. <br />
<br />
I already tried to set the cell width in the onCreate / onPrepare / onRender hooks of the crosstab itself and in the affected cells. Unfortunately this doesn't work at all and I have no idea how else I could get the report behaviour I want. For example changing the style (font, color,...) works like expected.<br />
<br />
I would appreciate any help.<br />
<br />
Regards<br />
Klaus
Find more posts tagged with
Comments
mwilliams
Hi Klaus,
So, when there are less than 5 "measure" columns, it cuts off the headers, but if there are more than 5, it works fine? Is there any way you can recreate this with the sample database so I can see it and work with it to see if I can come up with anything?
tis
Hi Michael,
I can try to recreate it with the sample database tomorrow.
But the main problem is that I can not set the width with a script depending on the number of columns.
Oh and I forgot to mention one importent aspect of the whole issue. In HTML and with other emitters everything works fine, the problem occurs only with the PDF emitter. I attached two screenshots to this post.
Cheers
Klaus
mwilliams
Klaus,
Let me know if you get the issue recreated. If not, send me the report design you have the issue with and I'll just see if I can see anything that could be causing the issue. Recreated with the sample database is obviously better though, because I can run it and test with it.