title: How to remove zeroes after the decimal point as an expression in SSRS
body: <p>I have the following expression in one of my textbox in my SSRS Report:</p>
  
  <pre><code>=IIF(IsNothing(Lookup(Trim(Fields!venta_Cod_vendedor.Value) &amp; "-" &amp; ReportItems!Textbox233.Value, Fields!AgregarVentas.Value, Fields!venta_prom_sem.Value, "EfectividadDeFrecuencias_Ventas")) = True
  
  ,"0"
  
  ,IIF(Lookup(Trim(Fields!venta_Cod_vendedor.Value) &amp; "-" &amp; ReportItems!Textbox233.Value, Fields!Agregar.Value, Fields!total_cant_pos.Value, "EfectividadDeFrecuencias_Total") &lt;&gt; "0"
  
  ,FormatNumber(Lookup(Trim(Fields!venta_Cod_vendedor.Value) &amp; "-" &amp; ReportItems!Textbox233.Value, Fields!AgregarVentas.Value, Fields!venta_frecuencia.Value, "EfectividadDeFrecuencias_Ventas")
  / Lookup(Trim(Fields!venta_Cod_vendedor.Value) &amp; "-" &amp; ReportItems!Textbox233.Value, Fields!Agregar.Value, Fields!total_cant_pos.Value, "EfectividadDeFrecuencias_Total"),2)
  
  ,"0"))
  </code></pre>
  
  <p>That division will give me an int64 number, 15 digits (If such math operation gives that amount of decimal digits).</p>
  
  <p>So the results are:</p>
  
  <p><a href="https://i.stack.imgur.com/qYSQa.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qYSQa.jpg" alt="enter image description here"></a></p>
  
  <p>Now here is the tricky part:
  My code behind that grabs the Dataset does a round and converts to decimal and then shows to a Crystal Report.</p>
  
  <pre><code>dr.venta_prom_sem = (Convert.ToDouble(dr.total_cant_pos) != 0 ? (Math.Round((Convert.ToDouble(dr.venta_frecuencia) / Convert.ToDouble(dr.total_cant_pos)), 2)).ToString() : "0");
  </code></pre>
  
  <p>So this will give me:</p>
  
  <p><a href="https://i.stack.imgur.com/8Wo3F.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Wo3F.jpg" alt="enter image description here"></a></p>
  
  <p>as you can see if I use a format Number the 1.3 will convert to 1,30 and that will be wrong, same as 1 (1,00). Now 1,339...etc will give me 1,34 and that is fine.</p>
  
  <p>But check the 1.065, with FormatNumber that will give me 1.07 instead of 1.06.</p>
  
  <p>So the thing is, how can I format my numbers to be the last non zero digit after the decimal point AND select the lower value if the (in this case) 3rd value is 5, instead of 1.07 be 1.06. I think If I use Ceiling or Floor it gives me the integer part.</p>