Home
Analytics
About Cross Tabs
kallem
Hello,
I needed horizontal to create table that grows dynamically. First I did it with Table and used scripting but it became rather difficult to do for someone doesn't handle scripts.. So I ended up trying Cross Tab. During table creation I have encountered few question marks..
1) Row numbers. Is there any plans for similar line numbering system as in Table? Or did I just miss it..
2) Alternating row colors. There is no similar highlight system for row as in Table? Is is planned? It would simplify things as playing with data set row indexes isn't that self clear.
3) Those thin lines around table and cells. How do I get rid of them? Mostly table is enough for reports and as it doesn't have these borders it creates visible difference in layouts.
4) Can I somehow add extra columns in summary area that aren't attached to any detail columns (sorry if terms aren't correct)? In the report I needed extra column to show additional statictics. First I created it with separate grids in column header and detail but it caused to much syncing of widths. So I made a dummy detail column to get extra summary column to play with.. It works but seems and is a bit of hack..
Prethanks,
Kalle
Find more posts tagged with
Comments
mwilliams
Hi Kalle,
For row numbering, you could just put a 2 column, 1 row grid in your row dimension area of your crosstab, put your dimension field in the right cell and use a variable to display a row count that you create yourself by incrementing the variable each time the row is created.
For highlighting every other row, you can see an example here:
http://www.birt-exchange.org/org/devshare/designing-birt-reports/825-crosstab-highlight-using-script/
For getting rid of the lines around the cells, you can simply add a border that is the color of your background to mask them away.
For an extra column, you can click on the image next to the summary field and choose to add a derived measure.
Hopefully this answers all of your questions. Let me know!
kallem
Hi Michael,<br />
<br />
and thanks for the tips.<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="68756" data-time="1285334413" data-date="24 September 2010 - 06:20 AM"><p>
For row numbering, you could just put a 2 column, 1 row grid in your row dimension area of your crosstab, put your dimension field in the right cell and use a variable to display a row count that you create yourself by incrementing the variable each time the row is created.<br /></p></blockquote>
I was actually looking for similar column binding as in Table: row.__rownumber. It would simplify row indexing. Any chance that it might be in upcoming features? Or should I log request?<br />
<br />
<blockquote class='ipsBlockquote' ><p>
For highlighting every other row, you can see an example here: <a class='bbc_url' href='
http://www.birt-exchange.org/org/devshare/designing-birt-reports/825-crosstab-highlight-using-script/'>http://www.birt-exchange.org/org/devshare/designing-birt-reports/825-crosstab-highlight-using-script/</a><br
/></p></blockquote>
I added row number in the data set and used cell highlighting as it seemed easier in future if someone does reports who doesn't like scripts. The above rownumber question is related to this as then row index wouldn't be needed in data set.<br />
<br />
Btw. might there be coming a possibility to add highlight rules for rows in Cross Tab?<br />
<br />
<blockquote class='ipsBlockquote' ><p>
For getting rid of the lines around the cells, you can simply add a border that is the color of your background to mask them away.<br /></p></blockquote>
This caused caps between cells and it breaks the layout when compared to Table. By setting border style values in crosstab styles to "No Line Style" then I got layout as I wanted.<br />
<br />
<blockquote class='ipsBlockquote' ><p>
For an extra column, you can click on the image next to the summary field and choose to add a derived measure.<br /></p></blockquote>
I'd need column in the grand summary area and derived measure column is created in the detail area. It would satisfy my needs if grand summary column could be created for derived column but I didn't find it possible? Even thought the detail column is not at all needed and needs to be hidden...<br />
<br />
<br />
Out of curiosity how old is the Cross Tab item?<br />
<br />
- Kalle
mwilliams
Kalle,
Logging an enhancement request for the row numbering would be good. You can do so at
http://www.birt-exchange.org/org/resources/bug-reporting/
.
For the highlight rules in rows for crosstabs, you could tie that into your request above.
For the cell line thing, I forgot that there was the option to turn all of them off. Most instances I come across, people only want to hide the lines for certain hidden cells.
For the added column, if you want to do it in the grand total area, you could just add a grid in the totals area and drag a data element into the extra cell and do whatever computation you want done in it. You can size the cells to be the sizes you want so that it looks like there is an extra column.
I believe the crosstab was added in 2.2, but I'd have to double check on that.
kallem
Hi Michael,<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="68812" data-time="1285599472" data-date="27 September 2010 - 07:57 AM"><p>
For the added column, if you want to do it in the grand total area, you could just add a grid in the totals area and drag a data element into the extra cell and do whatever computation you want done in it. You can size the cells to be the sizes you want so that it looks like there is an extra column.<br /></p></blockquote>
I thought about that too. Only minor problem with that is that header and detail area are separated. Two grids are needed and then their column widths need to be fixed.<br />
<br />
Adding dummy detail column works quite nicely. I just removed all the data items from the cells and set header cell width to 1 to keep column from eating space. When width is set to 0 column actually has width depending on other columns settings. What might be causing that?<br />
<br />
- Kalle
kallem
Enhancement request for <a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=326388'>Cross
Tab row numbers and higlights</a> is now logged.<br />
<br />
- Kalle
mwilliams
Kalle,
The remaining width could be padding on the cell. The best way to get a cell to disappear is to go to the advanced properties in the property editor, go to the "section" section, and set the "display" to "no display".
Thanks for logging the request!
kallem
Hi Michael,<br />
<br />
I tried setting cell display to "No display" but there seems to be little problem. I have following structure in Cross Tab header column:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>Header: Detail:
[Label ] [Value label]
Row:
[Name ][Index] [Value1][Value2]
</pre>
Index shouldn't be visible and to made it so I had set it's cell width to 1 which hides the cell well enough. Now I tried leaving it's width to unset and set display to "No display". When previewing result was:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>Header: Detail:
[Label ] [Value label]
Row:
[Name ][Value1] [Value2]
</pre>
So Index was gone but first value was shown in place of it. It seems that column header assumes that index has width although it isn't visible or it might just count that there is two columns and take first two visible. I suppose this is a bug?<br />
<br />
- Kalle
mwilliams
Kalle,
Are you talking about the row dimension header area no shrinking down? What is your BIRT version?
kallem
That indeed. I'm using BIRT 2.6.0. Should I update? If necessary I can post sample report design.
- Kalle
mwilliams
You could try downloading 2.6.1 and seeing if it still does this. If it does, you could file a bug for the header area not recognizing the "no display" setting on the dimension box.
kallem
Same thing happens with 2.6.1. Bug #326759 logged.
- Kalle
mwilliams
Thanks for the update, Kalle!