Home
Analytics
Hiding a crosstab columns in Excel
MKI
I want to hide two of the crosstab columns based on some condition. I have been able to achieve it by using
function onPrepareCell( cell, reportContext )
if(some condition){
if( cell.getCellID() == cell#){
cell.getStyle().setDisplay("none");
}
}
in the onPrepare event of cross tab. It works fine in PDF,HTML format but the columns are not getting hidden when the format is Excel. I need to get this done soon please help
Find more posts tagged with
Comments
JasonW
Can you try this in the onCreate instead of the onPrepareCell?
if( cellInst.getCellID() == 97){
cellInst.getStyle().setDisplay("none");
}
Jason
MKI
@JasonW
I already did but it is not working....
I think the solution is to set the width of the cell to '0' but the problem is there is no setter method to set the width of the cell from the script