Conditional Formatting Expression (OpenLab 2.7)

I'm using the following code to report RSD values for certain peaks and compare against a theshold value.  

For RTCheckArea, in the report I want the field to show in Green for Pass and Red for Fail, but I'm not able to come up with an expression which works:

  • It expects an expression that returns TRUE or FALSE. For this particular case, you could put "=RTCheckArea>=1000". The problem could be that the variable you are trying to call is not available. Are these variables defined in a ccf file linked to the data set? Also, I don't see "RTCheckArea" in your list. Do any of the ones that are listed work for any statement?

    I admit, I've never tried to call a ccf variable in Intelligent Reporter. The way I would do it is set up a report variable and use that. Let me know if you need any help

  • Hey ColeFunk,

    My mistake, I was referring to RSDCheckArea actually.  There is an entry for custom calculation results in the reporter, and I was trying to use that to say "if the custom field shows Pass, display the textbox in Green...if it shows Fail, display in red"

  • Hello,

    First since there are only 2 outcomes, I would change the font to green for the field or column. The you can use an expression like =CCR((Compound_CustomCalculationResults),"PFTest") = "Fail" where PFTest would be your custom calculation identifier in the conditional formatting to change the font to red. 

    Marty

  • Hello

    I'm trying to setup report to have values in column "PASS/FAIL" green or red depends on result.

    Can I do it as conditional formatting for column "PASS/FAIL" to mark FAIL as red based on text? 

    This column "PASS/FAIL" is custom field and I don't know how to setup condition formula in conditional formatting tab.

    Thanks for help

  • Go to the conditional formatting tab in the bottom left of the image you provided. You will be able to choose the formatting when a condition provided is true. In this case since you decided to say PASS or FAIL in the table, you will have to use the same calculation as before. The conditional will be at the default formatting unless the conditional is true, so I would format the text as green by default and as red in conditional formatting and provide the conditional =ABS((Compound_Amount/Compound_CalibAmount * 100) - 100) > 15.0, which is the opposite of the conditional you used to determine if it should be PASS in the if statement. If that doesn't work, you can try the if statement you had before, but just replace "PASS" with False and "FAIL" with True. The expression box in conditional formatting expects the return of True or False. Hope this helps!

Was this helpful?