Monday, September 1, 2008

Crosstabs with Column Headers

aka How to make Crosstabs that look like lists



| sales
------+--------------+---------
branch| sales person | <1234>
+--------------+---------
| sales person | <1234>


will look like


| sales
-----------+---------+--------
1st Avenue | Aaron A | 1,000
+---------+--------
| Betty B | 2,000
-----------+---------+--------
2nd Street | Clare C | 1,500
...


If it was a list it would have column headers and would look like this:


branch | sales person | sales
-----------+--------------+--------
1st Avenue | Aaron A | 1,000
+--------------+--------
| Betty B | 2,000
-----------+--------------+--------
2nd Street | Clare C | 1,500
...



To achieve this using a crosstab you need to add extra Text Items and hide some cells by setting their box type to ``none''



HIDE | "branch" | "sales person" | sales
---------------------+----------+----------------+------
branch| sales person | HIDE | HIDE | <1234>
+--------------+----------+----------------+-------
| sales person | HIDE | HIDE | <1234>



Hiding the top left corner will pull the extra Text Items to the left so that the "headers" will nicely align with their columns.
But adding these new text item still creates extra empty columns in the crosstab... these have to be hidden as well.

The resulting crosstab will look just like a list, displaying column headers.

You may need to play around with styling it to get everything in the right color....

7 comments:

  1. Its great to know that someone is putting real experience stuff and excellent technique.

    Is it possible for you to put it more details, about where and how to get "Text Item" in cross tab report. I am trying but not getting succeed.

    Appreciate your help.

    ReplyDelete
  2. I have a cross tab report with multiple measures i want to get different aggregate caluculation at cross tab intersection for different measures at the bottom crosss tab intersection ?

    ReplyDelete
  3. can you be more specific?

    ReplyDelete
  4. some additional information to above solution

    step1:select the text area u want include the labels put the box type property is none

    step2:please text and enter related label name.It will give some empty cross tab cells

    to that cross tab cells select the box type property as none it will work fine.

    ReplyDelete
  5. Great post of baluable for me when I get an opportunity to begin

    duck life 2
    vex 2
    fnaf 2

    ReplyDelete