Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Math Calculation Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Jun 2009 at 5:25pm

Your @ line formula is giving you a negative result. You are using it in the @profit and subtracting it. Subtracting a negative # is actually adding that amount so you should never end up with a negative amount correct?

This should have no impact on it displaying 0 unless it makes your @profit = 0.
Usually with these I break my formula up to test the parts to make sure I get the result from the parts that I expect and then I put them back together (usually after I fix the broken part).
My guess is you may have a problem with the ultimate result of your @profit . To make it all one formula for testing it would be:
{SALESLINE.LINEAMOUNT}-({SALESLINE.COSTPRICE}*{SALESLINE.QTYORDERED})
Does this get you the amount you expect for the profit?
 


Edited by DBlank - 09 Jun 2009 at 5:30pm
IP IP Logged
<< Prev  Page  of 2
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum