Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: If-Then with calculated field Post Reply Post New Topic
Author Message
Jo6205
Newbie
Newbie
Avatar

Joined: 17 Aug 2015
Online Status: Offline
Posts: 3
Quote Jo6205 Replybullet Topic: If-Then with calculated field
     Posted: 24 Aug 2015 at 9:21am
Hopefully I'm in the right place.

There is a list of purchase orders with different items and the cost of each item. At the bottom of the list is the total cost of the purchase order. What I want to do is if the total cost of the purchase order is $50,000 or higher, each item on the corresponding purchase order is to be multiplied by 10% and if the total of the purchase order is under $50,000, the the items are to be multiplied by 20%.

The field I'm evaluating is a calculated field and I'm not sure how to us a calculated field as the criteria. I've seen plenty of direction on how to create a calculated field but not using one.

BTW, how do I add my code? I can't find the instructions.



<code>
If {brptTRCJBJasonSummary;1.TotalContractAmt} >= 50 then

{brptTRCJBJasonSummary;1.CurrContractAmt} * 0.1
else
{brptTRCJBJasonSummary;1.CurrContractAmt} * 0.2
</code>            
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 25 Aug 2015 at 4:28am
You need to create a formula and put the code in the formula.  I hope this helps.
IP IP Logged
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