Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: Conditional Formatting  (Read 3664 times)

CorsaiR

  • Newbie
  • *
  • Posts: 2
    • View Profile
Conditional Formatting
« 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

Subst

  • Sr. Member
  • ****
  • Posts: 450
    • View Profile
Re: Conditional Formatting
« Reply #1 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'}
« Last Edit: August 01, 2016, 08:42:23 am by Subst »

CorsaiR

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Conditional Formatting
« Reply #2 on: August 01, 2016, 09:12:32 am »
Subst, Thank you