cancel
Showing results for 
Search instead for 
Did you mean: 

If else syntax correct SAP Business One HANA Crystal report

nikunjmehta2290
Participant
414

Dear all,

I have set this query to suppress the header if it's false the condition into Crystal report. But the below query is not working.

If ({GSTTAX_ARINVOICE.EI_ACK_NO}) = "" then
    true
else if ({GSTTAX_ARINVOICE.EI_ACK_NO}) = "" and ({GSTTAX_ARINVOICE.BP GSTN}) = !"" then
    false
else 
    false;

How to pass twice times true condition in above syntax Crystal report.

Here , it's gives error like A number ,curreny amount, boolean, date time or string is expected here.

SAP Business One HANA

Kind Regards,

Nikunj

Accepted Solutions (0)

Answers (2)

Answers (2)

DellSC
Active Contributor
0 Kudos

<soapbox>Your expression needs to evaluate to true or false - this doesn't mean you need to specify true or false in an if statement</soapbox> This should work for you because it will return true if {GSTTAX_ARINVOICE.EI_ACK_NO} is empty, but only if {GSTTAX_ARINVOICE.BP GSTN} is not equal to "!". In all other cases it will return false.

{GSTTAX_ARINVOICE.EI_ACK_NO} = "" and {GSTTAX_ARINVOICE.BP GSTN} <> "!" 

-Dell

ido_millet
Active Contributor
0 Kudos

and ({GSTTAX_ARINVOICE.BP GSTN}) = !""

==>
and ({GSTTAX_ARINVOICE.BP GSTN}) = "!"