title: How to set default value of parameter input control in Ireport
body: <p>I have a problem with my parameter who are an input control in Ireport. My parameter is a boolean. And I try to set a default value because I need to modify my sql request with parameter. By example if my parameter is true so I put on my request a like with an other parameters else I put nothing. But my problem is my parameters is always true or false and not the value I define in default value. </p>
  
  <p>This is my try with default value of my parameter:</p>
  
  <pre><code>$P{choix_repere_depart}=="true" 
  ? " AND d.cellule like '%$P{mot_cle}%'" 
  : " "
  </code></pre>
  
  <p>And this my sql request:</p>
  
  <pre><code>SELECT
       r.designation as designation,
       l.nom as nom,
       e.gare as gare,
       b.intitule as intitule,
       a.code_mire as code_mire,
       af.codegmao as codegmaoAF,
       ap.codegmao as codegmaoAP,
       d.cellule as repere,
       d.observation as observation,
       m.appareil as appareil
  FROM
        armoireprincipale ap
  LEFT JOIN armoire a ON a.idbranchement = ap.idbranchement
  LEFT JOIN armoirefille af ON af.idbranchement = a.idbranchement
  LEFT JOIN branchement b ON b.idbranchement = a.idbranchement
  LEFT JOIN ligne l ON l.id_ligne = b.id_ligne
  LEFT JOIN reseau r ON r.id_reseau = l.id_reseau
  LEFT JOIN edifice e ON e.indic = b.indic
  LEFT JOIN depart d ON d.idbranchement = a.idbranchement
  LEFT JOIN materiel m ON m.id_materiel = d.id_materiel
  WHERE  a.idbranchement IN (SELECT b.idbranchement
              FROM branchement b0
              LEFT JOIN cable c ON c.idbranchement = b0.idbranchement
              LEFT JOIN cable_depart cb ON cb.id = c.id
              LEFT JOIN depart d0 ON d0.iddepart = cb.iddepart
              LEFT JOIN armoire a0 ON a0.idbranchement = d0.idbranchement
              LEFT JOIN armoireprincipale ap0 ON ap0.idbranchement = a0.idbranchement
              WHERE ap0.ug_pef= $P{id_pef}
  ) $P{choix_repere_depart};
  </code></pre>
  
  <p>So I need help to understand what is wrong on my report. If someone has an idea please help me!!! Thank!!</p>