Show or hide a table depending on the value of a boolean field in a report

Hi, I would like to print or hide a one2many table, the story that I have a boolean field named bar, if bar is False a one2many table will be printed on the pdf generated. This is the line of code to ensure the state of the boolean field:
<text:p text:style-name="P180"><text:placeholder text:placeholder-type="text">&lt;when test=&quot;formulaire.bar ==&lt; False&quot;&gt;</text:placeholder></text:p>

else if bar is True the one2many table will be hided( i don’t want to print the table in the pdf generated) and a sentence will be displayed “No Table”.

I have tried that with the code below , but it doesn’t give me a correct result (always show me “No Table” Whatever the case of the boolean field).

Complete code:

     <text:p text:style-name="P104"><text:placeholder text:placeholder-type="text">&lt;choose test=&quot;&quot;&gt;</text:placeholder></text:p>
      <text:p text:style-name="P180"><text:placeholder text:placeholder-type="text">&lt;when test=&quot;formulaire.bar ==&lt; False&quot;&gt;</text:placeholder></text:p>
  <table:table table:name="Table1" table:style-name="Table1">
   <table:table-column table:style-name="Table3.A"/>
   <table:table-header-rows>
    <table:table-row>
     <table:table-cell table:style-name="Table3.MS" office:value-type="string">
      <text:p text:style-name="Header">Visual inspection</text:p>
     </table:table-cell>
    </table:table-row>
   </table:table-header-rows>
  </table:table>
  <table:table table:name="Table3" table:style-name="Table3">
   <table:table-column table:style-name="Table3.A" table:number-columns-repeated="13"/>
   <table:table-header-rows>
    <table:table-row>
     <table:table-cell table:style-name="Table3.MS1" office:value-type="string">
      <text:p text:style-name="Header">Nr</text:p>
     </table:table-cell>
     <table:table-cell table:style-name="Table3.MS1" office:value-type="string">
      <text:p text:style-name="Header">Position</text:p>
     </table:table-cell>
     <table:table-cell table:style-name="Table3.MS1" office:value-type="string">
      <text:p text:style-name="Header">Seam</text:p>
     </table:table-cell>
    </table:table-row>
   </table:table-header-rows>
    <table:table-row>
     <table:table-cell table:style-name="Table3.M1" table:number-columns-spanned="5" office:value-type="string">
      <text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text">&lt;for each=&quot;line in formulaire.coverlays&quot;&gt;</text:placeholder></text:p>
     </table:table-cell>
     <table:covered-table-cell/>
     <table:covered-table-cell/>
     <table:covered-table-cell/>
     <table:covered-table-cell/>
    </table:table-row>
    <table:table-row>
     <table:table-cell table:style-name="Table3.M1" office:value-type="string">
      <text:p text:style-name="Header"><text:placeholder text:placeholder-type="text">&lt;line.nr&gt;</text:placeholder></text:p>
     </table:table-cell>
     <table:table-cell table:style-name="Table3.M1" office:value-type="string">
      <text:p text:style-name="Header"><text:placeholder text:placeholder-type="text">&lt;line.position[:80]&gt;</text:placeholder></text:p>
     </table:table-cell>
     <table:table-cell table:style-name="Table3.M1" office:value-type="string">
      <text:p text:style-name="Header"><text:placeholder text:placeholder-type="text">&lt;line.seam[:80]&gt;</text:placeholder></text:p> 
     </table:table-cell>
    </table:table-row>
     <text:p text:style-name="Table_20_Contents"><text:placeholder text:placeholder-type="text">&lt;/for&gt;</text:placeholder></text:p>
  </table:table>   
  <text:p text:style-name="P180"><text:placeholder text:placeholder-type="text">&lt;/when&gt;</text:placeholder></text:p>    
      <text:p text:style-name="P180"><text:placeholder text:placeholder-type="text">&lt;otherwise test=&quot;&quot;&gt;</text:placeholder></text:p>
  <table:table table:name="Table1" table:style-name="Table1">
   <table:table-column table:style-name="Table3.A"/>
   <table:table-header-rows>
    <table:table-row>
     <table:table-cell table:style-name="Table3.MS" office:value-type="string">
      <text:p text:style-name="Header">No Table </text:p>
     </table:table-cell>
    </table:table-row>
   </table:table-header-rows>
  </table:table>
  <text:p text:style-name="P180"><text:placeholder text:placeholder-type="text">&lt;/otherwise&gt;</text:placeholder></text:p>
  <text:p text:style-name="P180"><text:placeholder text:placeholder-type="text">&lt;/choose&gt;</text:placeholder></text:p>

thanks in advance.

The problem is that you are comparing a Boolean to a Char field, so the comparission is always false.

This is what your are doing now:

>>> True == 'False'
False
>>> False == 'False'
False

You should remove the quotes from your condition:

formulaire.bar == False

Hope it helps!