Conditional Format for N value in fence report

Hello,

I am trying to conditionally format a text vs depth entity used to display the calculated N value on my fence reports. I would like the N value to be bolded and underlined when the sample type is an MC and report as regular text when the sample type is anything else. The sample type is inputed in <<Sample.Type>>. I have tried using an IIF but have not had any success.

This is the code for the calculated N value used in my fence report:

<<Let(Refusal Pen = <<User System Data.Refusal Penetration>>)>>_
<<HasData(<<SAMPLE.RQD Length>>,_
  <<ListBuildSepTrim(_
  <<cr>>,_
  <<Format(_
    <<Calc(100 * <<SAMPLE.Recovery Length>> / <<SAMPLE.Length>>)>>,_
    0_
  )>>,_
  <<DelimitData(_
    "(",_
    <<Format(_
      <<Calc(100 * <<SAMPLE.RQD Length>> / <<SAMPLE.Length>>)>>,_
      0_
    )>>,_
    ")"_
  )>>_
)>>,_
  <<HasData(<<SAMPLE.Blows 3rd>>,_
    <<Calc(<<SAMPLE.Blows 2nd>> + <<SAMPLE.Blows 3rd>>)>>,_
    <<FirstData(<<SAMPLE.Blows 2nd>>,<<SAMPLE.Blows 1st>>)>>_
  )>>_
  <<HasData(<<Get(Refusal Pen)>>,_
      )>>_
)>>

  • This worked for what I need, thank you very much!

  • Hi CJ,

    It is hard to say without your actual files as the Refusal code looks like it won't call anything in, but I don't have the code you have written in your <<User System Data.Refusal Penetration>> to determine. If it is the standard one it won't call anything in.

    But the line that is calculating the true N value and not refusal is 

    this line in your code

    <<Calc(<<SAMPLE.Blows 2nd>> + <<SAMPLE.Blows 3rd>>)>>,_

    If you try changing The one line of code to this (assuming your Sample Type is called MC and assuming you don't want to account for refusal .) It may give you what you want. 

    <<IIf( <<SAMPLE.Type>> = "MC", <<B>><<U>><<Calc(<<SAMPLE.Blows 2nd>> + <<SAMPLE.Blows 3rd>>)>><<B>><<U>>,<<Calc(<<SAMPLE.Blows 2nd>> + <<SAMPLE.Blows 3rd>>)>>)>>,_

    If this doesn't work for what you need then send me an e-mail and we can create a service request to get your files. kirk.johnson@bentley.com

    Always remember to keep a copy of your original code so you can go back to it if you choose to do so.

    If you are interested in Fence Report Design this is great reference material.

    Product(s): gINT Logs, gINT Professional, gINT Professional Plus Version(s): N\A Environment: N\A Area: Report-Fence Subarea: N\A …
    Last edited in OpenGround | gINT | Keynetix > gINT | Keynetix Wiki

    Answer Verified By: CJ Jensen