Jump to content

Different color with variables.


---
 Share

Recommended Posts

Hello.

The reason for this message is as follows. In a PiWeb template, I would like a rectangle that I am going to add to a label that I created, can have two colors:

1. If the two elements you choose are within tolerance, let the rectangle be green.
2. If either of two elements is out of tolerance, make it red.

Please, does anyone have any idea how to do it with variables?

Thank you.

Capture.PNG

Link to comment
Share on other sites

  • 2 weeks later...
Hello Sergio,

There are many ways you can do this, but perhaps a simple way is to have a condition statement on your text field checking how many values are out of tolerance.

${Qdb.Measurement.ValuesOutOfLimit("ToleranceLimits")} will return 0 of all values are "green" and the exact number of values out of tolerance if there happens to be characteristics out of tolerance.

1. Add text element in report.
2. Define text in text element: ${Qdb.Measurement.ValuesOutOfLimit("ToleranceLimits")}
3. Set text color as transparent
4. Add conditional format for background: Equal to 0 then change background to green
5. Add second conditional format for background: Greater than 0 change background to red

Hope this helps!

Best Regards,

Josh Smokovitz
Link to comment
Share on other sites

  • 3 weeks later...
 Share

×
×
  • Create New...