Skip to Content

Hiding last column of a crosstab

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!!!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 17 at 01:33 PM

    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

    Add comment
    10|10000 characters needed 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