KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Pivot matrix row color and total bold #2718

Closed Edp Ferrino opened this topic on on Jun 9, 2022 - 4 comments

Edp Ferrino commented on Jun 9, 2022

Hello, I would like to know how you can change the color of the alternating lines and how to see the total fields in bold.

Thank you

Sebastian Morales commented on Jun 10, 2022

For the data zone rows, you could set css background color differently for odd and even children following this guide:

.krpmDataZoneDiv tbody:nth-child(odd) {
    background-color: white;
}
.krpmDataZoneDiv tbody:nth-child(even) {
    background-color: lightgray;
} 

For total rows and columns you could inspect element and use their css class to set font style = bold. For example:

.krpmDataCellRowTotal,
.krpmDataCellRowGrandTotal,
.krpmDataCellColumnTotal,
.krpmDataCellColumnGrandTotal {
    ...
}
Edp Ferrino commented on Jun 10, 2022

I add this css to my view html

.krpmDataZoneDiv tbody:nth-child(odd) {

background-color: white;

} .krpmDataZoneDiv tbody:nth-child(even) {

background-color: lightgray;

}

.krpmDataCellRowTotal, .krpmDataCellRowGrandTotal, .krpmDataCellColumnTotal, .krpmDataCellColumnGrandTotal {

font-weight: bold;

}

Bold now is correct, but alternate color to difference row not run correctly. Is always lightgray.

Sebastian Morales commented on Jun 10, 2022

Oh sorry, the background rules should be like this:

.krpmDataZoneDiv tbody tr:nth-child(odd) {
    background-color: white;
}
.krpmDataZoneDiv tbody tr:nth-child(even) {
    background-color: lightgray;
} 
Edp Ferrino commented on Jun 10, 2022

Perfect. Thank you.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

None