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. :-)


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.