cancel
Showing results for 
Search instead for 
Did you mean: 

How to access a cell of a crosstab in SAP design studio

former_member544949
Participant
0 Kudos

Hi Experts,

Is this possible to give a colour to a specific cell of a crosstab in SAP design studio 16.5.0 ?

I know how to access a specific row or a column but how to access a specific cell?

Any help will be appreciated.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

arijit_das
Active Contributor

Assuming you want to change color of a cell in the data area, you can use the following css:

.myCrosstab .sapzencrosstab-DataArea>tbody>tr:nth-child(3)>td:nth-child(2){
background-color:red !important;
}

The above code is for row 3 column 2 of the data area as shown in the screenshot below:

former_member544949
Participant
0 Kudos

Thanks Ajit for your help.

Your solution definitely works for the fixed cell.

My problem is that I have to highlight the cell of which the position dynamically changes depending on the set of records. But the cell is always the cell in the last row (column is always fixed).

e.g. 85,197.10 in your table (column is fixed but the row may be the third , fifth or eight row.

Is there any way to solve this issue?

Many thanks!!

arijit_das
Active Contributor
0 Kudos

Yes. You can use the css like below (last row; 2nd column):

.myCrosstab .sapzencrosstab-DataArea>tbody>tr:last-child>td:nth-child(2){
    background-color:red !important;
}
former_member544949
Participant
0 Kudos

Thanks Arijit !!!

The soloution works

Answers (1)

Answers (1)

howsy
Explorer
0 Kudos

Dear Afreen,

you can achieve that by using Exceptions within Queries. the Exception is also thrown within design studio and you can use that CSS for coloring.

Regards,
Chris