Note that there are some explanatory texts on larger screens.

plurals
  1. POCrystal Report displaying formula result as 00
    primarykey
    data
    text
    <p>First of all I would like to apologize if this has been asked before, I just couldn't find the answer. To the point: My problem is as follows: I am using Crystal Reports for VS2010 and I have a field that should dispaly 1 or -1 based on an If check</p> <pre><code>If IsNull ({Orders.OrderReplacedBy}) Then 1 Else -1 </code></pre> <p>It should display in my report 1 for null values of the field and -1 otherwise. Problem is that in my report I get only .00 no matter the value of the if test. Furthermore I have another formula field that does of a sum of all the 1s and -1s showed on the report, and it seems to be working a little weird. In my database I have 772 total rows, of which 39 are NULL (so there should be 733 1s and 39 -1s with a sum of 694) and the displayed sum is 488. The code for the sum is as follows:</p> <pre><code>Sum({@N}) </code></pre> <p>where N is the field where I calculate the 1s and -1s.</p> <p>What I've tried so far:</p> <ul> <li>changed the If test from IsNull to <code>ToText({Orders.OrderReplacedBy})=""</code></li> <li>changed the If test to <code>{Orders.OrderReplacedBy}&gt;0</code> as the OrderReplacedBy field in the database is numeric and there cannot be values less than zero, so the NULLs should just trigger the Else.</li> <li>trid to change the display of the formula to <code>"1"</code> and <code>ToNumber("1")</code> nothing seems to work</li> </ul> <p>I honestly have no more ideas of what else to try and I also have no knowledge of Crystal Reports (I am only working with it for 2 days and just need to modify a report on an existing app).</p> <p>Any help would be appreciated,</p> <p>Thanks :)</p> <p>P.S.: I am working with Silverlight 4</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload