How can I change column headers in tables/pivot tables in icCube reporting v6?

81 views Asked by At

Is it possible to change the column headers of tables/pivot tables? By default they are named as the hierarchy/measure. enter image description here

1

There are 1 answers

0
Artem Lopatiy On

You can use icCube Table's Cell Renderers to do that.

Cell renderers is a powerful feature of icCube tables, that provides a bunch of opportunities to configure look & feel of your tables.

It can be found under "Data Render Options" category of widget options.

Several Cell Renderers

If you have static order of columns in your table you can create cell renderers for each column bound by it's index:

First column: enter image description here

Second column: enter image description here

One Cell Renderer / Javascript Way

This is a dynamic solution and doesn't depend on columns order.

You might want to use "Top Header Text" field to overwrite header label as shown in the picture below: enter image description here

In this case I've created an alias for header labels with this peace of javascript code:

enter image description here

This solution an code could be expanded to handle as many columns as you need.

P.S.

"Top Header Text" field's expression value suitable for your case:

var header = context.columnLabel()

switch(header){
    case 'formatted_date_hierarchy': return 'Date';
    case 'product_hierarchy': return 'Product';
    default: return header;
}

UPDATE

Here is a Demo Report with first solution.