Q: Trying to write a crystal report if statement with multiple if's and else and getting a Boolean error Trying to get a rate for different dates of service by a certain program.   Example need the rate to be 110.00 prior to 1/1/2023 for program EXMHA and after 1/1/23 the rate needs to be 127.00.  And the rate of 87.00 prior to 1/1/2023 for program EXBEHAVLINK and after 1/1/23 after the rate needs to be 95.00.
If {billing_pay_adj_history.date_of_service} <= date(2022,12,31) and {billing_tx_history.program_X_RRG_code} ='EXMHA' then
'110.00'
else '127.00' or
If {billing_pay_adj_history.date_of_service} <= date(2022,12,31) and {billing_tx_history.program_X_RRG_code} ='EXBEHAVLINK' then
'87.00'
else '95.00'
I get a boolean error.
If I only have one of the if statements the if statement works but adds the data to all the programs which is not correct.    I need to figure out how to do both in the same if statement.
My if statement before the rates change that worked with no issues.
If {billing_tx_history.program_X_RRG_code} = 'EXMHA' then 110.00 else
If {billing_tx_history.program_X_RRG_code} = 'EXBEHAVLINK' then 86.00 else 0

A: You can't have an else '127.00' or in the middle of an if statement.
Restructure to use else if instead.
