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)
BIRT - Representing a row as a column header
joo
Hi everyone,<br />
<br />
I have a query regarding converting each value in a row of a data set as a header in a BIRT table. For example consider the following data set.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
Name | Efficiency
John | 32
Henry | 12
Birt | 9
Bart | 20
Harry | 89
</pre>
Now I can bind the column 'Name' and drag it into a table. This would display the name in every row of the table. Instead, I would like to represent each name as a column heading in BIRT. For example the table should look like<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
Stats | John | Henry | Birt | Bart | Harry |
% Efficiency| 32% | 12% | 9% | 20% | 89% |
</pre>
I tried to research this but ended up short of an answer. I guess I did not search with the right keywords. If you know of a solution please let me know. If this is already documented somewhere point me in the right direction. <br />
<br />
Thank you for your time
Find more posts tagged with
Comments
CBR
Hi joo,
the only way to reverse row values to columns is using a crosstab.
There is another way to reverse row values to column values but then your values have to be static. Static means that you have to ensure that your database table always only contains the names
John
Henry
Birt
Bart
Harry
adding a row for another developer means that you have to change the report.
when using a crosstab your data can be completly dynamic. Just create a datacube based on your dataset and add the column name as a dimension. After that drag the column efficiency in the measures section and choose the propriate aggregator function (a crosstab always aggregates rows, but i doesn't have a problem when there is only one row for each developer).
After that save the cube and drag it to your report (this ends up in BIRT creating a crosstab based on that cube for you)
If you need to have a example i can quickly create one for you using the ClassicModels db
jyol
Is there anyway I can get the crosstab to format as below:
Customer Name
Apr-09 May-09 Jun-09 Jul-09 Aug-09 Sep-09 Oct-09 Nov-09 Dec-09
Last, First (customer name here)
**** **** **** **** **** **** **** **** ****
I tried creating a table with customer name column in one detail row and the second detail row crosstab, but that didn't help. Is there any way I can have a crosstab with customer name in an entire row and then the measures on the below row?
Also, if I want to give the user an option (using report parameters) to sort either by name or total amount (sum of all the months), how do I do it? Sort Key expression on crosstab didn't quite work for me.
Thanks.