1.
I have a formula in Crystal Reports 9:
if(isnull({RECORDED_SERVICE.SERVICE_STATUS_MONIKER})) then
{RECORDED_SERVICE.UNITS}
else
if ({RECORDED_SERVICE.SERVICE_STATUS_MONIKER}="FB07BA368454433A989B840BDCE7340F")
then
{RECORDED_SERVICE.UNITS}
else
0
However if the two conditions are false I never get the 0..why?
2.
I have another formula that I want to go through a list of possible contact types, in order, and give me the number. If it gets to one that satisfies the criteria, I want it to give me that number and only that number..so i created a variable called checker. If checker is a 0 then evaluate the condition, if not dont. Heres what I have so far:
NumberVar checker :=0 ;
if ({contact.type} ='0480BE5B1CD54E79B161B533C50AA742') then
{contact.number};
checker := 1;
if ({contact.type} ='D4A537D6890040C994AD1F32A9E10F66') and checker
<> 1 then
{contact.number};
checker := 1;
if ({contact.type} ='31C5F9B0FE31462488649C7FB095869B') and checker
<> 1 then
{contact.number};
checker := 1;
if ({contact.type} ='A42A3BEAC1BB4B9E889E596039ABB485') and checker
<> 1 then
{contact.number};
checker := 1;
if ({contact.type} ='F119D5D5D79244FBB33B7D0AFCF258E8') and checker
<> 1 then
{contact.number};
checker := 1;
if ({contact.type} ='4A712FB4C549440499E36538EF2F9E3D') and checker
<> 1 then
{contact.number};
checker := 1;
if checker = 0 then
"No Contact Number"
So it will go to each if statement, if the if statement is true then checker would be set to = 1 and the rest of the if statements below it (and above it for that matter) should be false thus only giving me one contact number..Its not producing a number now and I dont know why, any help is appreciated..thanks
-JimI'm not sure about the answers to you questions, but you can try to use Case Statements instead of If statements, maybe you'll get more accurate results that way? Maybe your first question doesn't work because 0 is not a string?
(I'm not positive if this is the correct syntax)
SELECT CASE {RECORDED_SERVICE.SERVICE_STATUS_MONIKER}
CASE "" : {RECORDED_SERVICE.UNITS}
CASE "FB07BA368454433A989B840BDCE7340F": {RECORDED_SERVICE.UNITS}
CASE ELSE: "0"
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment