Skip to Content
0

Hiding last column of a crosstab

Jan 16 at 05:50 PM

67

avatar image

Dear Experts,

I am using SAP design studio 1.6 with BEx queries as a data source .

I have a crosstab like this.

ABCabcdefabcdef123

I don’t want to display the last column i.e. Column C and want the output like this

ABabcdef123

I’ve used this formula but it’s not hiding the required one

.x .sapzencrosstab-ColumnHeaderArea td.sapzencrosstab-HeaderCellDefault:not(:nth-child(2)),.x .sapzencrosstab-DataArea td.sapzencrosstab-HeaderCellDefault:not(:nth-child(2)){

display:none!important;

}

Thanks for your help!!!

10 |10000 characters needed characters left characters exceeded

The requirement is not very clear from the text. Can you post some screenshot ?

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Uladzislau Pralat Jan 17 at 01:33 PM
0

Hi Afreen,

this is what I did to hide columns 3 and 4 in CROSSTAB_1:

table#CROSSTAB_1_dataArea td:nth-child(2) {
   display: none;
}
table#CROSSTAB_1_colHeaderArea td:nth-child(2) {
   display: none;
}
table#CROSSTAB_1_dataArea td:nth-child(3) {
   display: none;
}
table#CROSSTAB_1_colHeaderArea td:nth-child(3) {
   display: none;
}

Regards, Uladzislau

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Afreen,

by the way you can also hide columns dynamically. Define first css class

.test .sapzencrosstab-DataArea td.sapzencrosstab-DataCellDefault:nth-child(2), 
.test .sapzencrosstab-ColumnHeaderArea td.sapzencrosstab-HeaderCellDefault:nth-child(2),
.test .sapzencrosstab-DataArea td.sapzencrosstab-DataCellDefault:nth-child(3),
.test .sapzencrosstab-ColumnHeaderArea td.sapzencrosstab-HeaderCellDefault:nth-child(3)
{
   display: none;
}

and the apply it dynamically in BIAL

CROSSTAB_1.setCSSClass("test");

Regards, Uladzislau

0