jobsta/reportbro-lib

Conditional Formatting

alisufyanbaig-dev opened this issue · 2 comments

Hey there Thanks for the awesome library!

I just have a question that how can we apply multiple level of conditional formatting to table rows i.e. if value is
Screenshot_1
more than 10 color will be green, if value is less than 10 color will be red

Currently it's only possible to apply one conditional style but we will consider this for a future improvement.
In the meanwhile, there might be a workaround in case you use tables:
You can define multiple content rows (every content row can have a background color) and apply a print condition on each of them

This report achieves the above result:
https://gist.github.com/mariarauch/18dec28935309030344a9ee665dfb8ed

With the latest release v3.3.0 we have added the feature to apply a ruleset of conditional styles. A usage guide will follow soon on the website.
For your example use case this is the report:
https://gist.github.com/mariarauch/b4b648231a66567b04dfcb7e501fb408