LimeReport Forum

General Category | Основное => Discussion | Обсуждение => Topic started by: CorsaiR on July 31, 2016, 08:33:18 PM

Title: Conditional Formatting
Post by: CorsaiR on July 31, 2016, 08:33:18 PM
Hi.
I need to color text depending on its value. I didn't find somewhat similar to conditional formatting. Can I use script for this?

Thanks,
Alex
Title: Re: Conditional Formatting
Post by: Subst on August 01, 2016, 08:39:55 AM
Hi!

U can do it using script
Look the demo report "change_item_from_script.lrxml" from demo_r1\demo_reports

It's can help you.

Below sample from that demo report

$S{
var color = new QColor('#DEB887');
var font = new QFont('Times New Roman',26,false,true);
THIS.backgroundColor = color;
THIS.fontColor = QColor('red');
THIS.font = font;

'Test'}
Title: Re: Conditional Formatting
Post by: CorsaiR on August 01, 2016, 09:12:32 AM
Subst, Thank you