title: Crystal Reports Number formatting whole number and decimals
body: <p>I am using VS2010 and Crystal reports plug-in and getting a value from stored procedure.
  The values on this field are whole numbers and some of the numbers do have decimals.</p>
  
  <pre><code>Col 1
  -----
  42
  25,725
  5.22
  </code></pre>
  
  <p>When I right-click and format object. I am unable to achieve this. If I enable decimal it is displaying </p>
  
  <pre><code>42.00
  25,725.00
  5.22
  </code></pre>
  
  <p>How can I achieve the format that I have mentioned. I appreciate your support.</p>
  
  <p>I tried the following formula:</p>
  
  <pre><code>//FieldOne is float
  //Probably don't need the else. 
  
  If InStr(ToText({proc1;1.FieldOne}),".") &gt; 0 THEN
  Truncate({Proc1;1.FieldOne},2)
  Else
  Truncate({Proc1;1.FieldOne})
  </code></pre>
  
  <p>I am getting a "string is required here." error</p>