Продолжайте получать ошибки в базовом синтаксисе с помощью оператора if - PullRequest
0 голосов
/ 13 мая 2019

Я продолжаю получать следующую ошибку при проверке формулы. Это в отчетах Crystal о базовом синтаксисе:

Здесь ожидается заявление.

Код:

if {?Pm-?dropdown_Barcodes} = "Prep" Then ({JobOperations.jmoProcessID} in ("BOELE","BOEHY","BOPRA","BOPRS"))
else 
if {?Pm-?dropdown_Barcodes} = "Main" then ({JobOperations.jmoProcessID} not in 
("BOELE","BOEHY","BOPRA","BOPRS"))
else
if {?Pm-?dropdown_Barcodes} = "All" then "All"

enter image description here

1 Ответ

0 голосов
/ 14 мая 2019

Ваш синтаксис неверен, если оператор не должен быть объявлен таким образом.

Попробуйте это:

if {?Pm-?dropdown_Barcodes} = "Prep" and ({JobOperations.jmoProcessID} in ("BOELE","BOEHY","BOPRA","BOPRS"))
then {JobOperations.jmoProcessID}
else 
if {?Pm-?dropdown_Barcodes} = "Main" and not({JobOperations.jmoProcessID} in 
("BOELE","BOEHY","BOPRA","BOPRS"))
then {JobOperations.jmoProcessID} 
else
if {?Pm-?dropdown_Barcodes} = "All" then "All"

редактировать ---------------------------------------------- -------------------

 if {?Pm-?dropdown_Barcodes} = "Prep" and ({JobOperations.jmoProcessID} in ("BOELE","BOEHY","BOPRA","BOPRS"))
    then Formula = {JobOperations.jmoProcessID}
    elseif {?Pm-?dropdown_Barcodes} = "Main" and not({JobOperations.jmoProcessID} in 
    ("BOELE","BOEHY","BOPRA","BOPRS"))
    then Formula ={JobOperations.jmoProcessID} 
    elseif {?Pm-?dropdown_Barcodes} = "All" 
then Formula ="All"
end if
...