Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Formula not calculating properly Post Reply Post New Topic
Author Message
th3strikes
Newbie
Newbie


Joined: 27 Mar 2017
Location: United States
Online Status: Offline
Posts: 1
Quote th3strikes Replybullet Topic: Formula not calculating properly
    Posted: 06 Jan 2023 at 6:55am
If this formula = 2

if({V_LMINVTRY_MANUFACTURED.CUSTOMER} Like '*Customer*') and(((3600/{STANDARD.CYCLETM})*{PARTNO.STDCAV})*3) >={V_LMINVTRY_MANUFACTURED.QUANTITY} then
((3600/{STANDARD.CYCLETM} *{PARTNO.STDCAV})/({V_LMINVTRY_MANUFACTURED.QUANTITY}))*3
else if(((3600/{STANDARD.CYCLETM})*{PARTNO.STDCAV})*3) >={V_LMINVTRY_MANUFACTURED.QUANTITY}
then((3600/{STANDARD.CYCLETM} *{PARTNO.STDCAV})/({V_LMINVTRY_MANUFACTURED.QUANTITY}))*3
else 2

Inserting +2 = 4

if({V_LMINVTRY_MANUFACTURED.CUSTOMER} Like '*Customer*') and(((3600/{STANDARD.CYCLETM})*{PARTNO.STDCAV})*3) >={V_LMINVTRY_MANUFACTURED.QUANTITY} then
((3600/{STANDARD.CYCLETM} *{PARTNO.STDCAV})/({V_LMINVTRY_MANUFACTURED.QUANTITY}))*3+2
else if(((3600/{STANDARD.CYCLETM})*{PARTNO.STDCAV})*3) >={V_LMINVTRY_MANUFACTURED.QUANTITY}
then((3600/{STANDARD.CYCLETM} *{PARTNO.STDCAV})/({V_LMINVTRY_MANUFACTURED.QUANTITY}))*3
else 2

Why does inserting *2 = 3 when it should be 4?

if({V_LMINVTRY_MANUFACTURED.CUSTOMER} Like '*Customer*') and(((3600/{STANDARD.CYCLETM})*{PARTNO.STDCAV})*3) >={V_LMINVTRY_MANUFACTURED.QUANTITY} then
((3600/{STANDARD.CYCLETM} *{PARTNO.STDCAV})/({V_LMINVTRY_MANUFACTURED.QUANTITY}))*3*2
else if(((3600/{STANDARD.CYCLETM})*{PARTNO.STDCAV})*3) >={V_LMINVTRY_MANUFACTURED.QUANTITY}
then((3600/{STANDARD.CYCLETM} *{PARTNO.STDCAV})/({V_LMINVTRY_MANUFACTURED.QUANTITY}))*3
else 2
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 01 Feb 2023 at 9:49am
Why not use *6 instead of *3*2?
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.