Report alternating foreground color


Paolo Lops
Hi David, how i can implement in a report control alternating rows colors?

DecSoft

Hello Paolo,

Suposing that your report's Wrapper is "table", you can try to set this CSS class: table-striped, in the Report Classes variable.



Paolo Lops
no, i have grid..

DecSoft

Hello Paolo,

The below is just a possible way to do, since, certainly we can, for example, specify a background color for every record container or element.

Anyway, I shown you here an easy way to achieve something like you wanted, that is, like if we use the above solution: that is, the solution that I propose you that works in case that our Report control have a "table" Wrapper and not a "grid" one.

Here is what you must to do, Paolo:

  1. Open the Report app sample of AB.
  2. Change the Report Wrapper variable to "grid".
  3. Open the Report HTML variable editor and replace the existing HTML by this one:

Then...

  1. Press "Accept" in the Report's HTML variable editor to save the changes.
  2. Now open the "Inline CSS" option of the app and write the below CSS code:

Save the app and run it. If everything is ok, you can see the Report shown the records in different backgrounds, depending if the Report's row/record is even or odd.

Please, go ahead if you have any further question.



Paolo Lops
Perfect!!!

DecSoft

Hello Paolo,

Glad to know that works for you. :-)


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.