samedi 19 octobre 2019

condition to provide zero value to the field if null and return subtracted two field in sap crystal reports

Hello I am using Sap Crystal Report, in that I am using two field.

Now, I want to provide 0 value to the null field and also return the subtracted two field.

For more clear lets see my code,

//Condition for null and provide 0 value to the field else same value to the field

If IsNull({TmpWholeSaleDetailItemReport.PurchaseFine}) or 
IsNull({TmpWholeSaleDetailItemReport.ReturnFine}) then

{TmpWholeSaleDetailItemReport.PurchaseFine} = 0 or
{TmpWholeSaleDetailItemReport.ReturnFine} = 0

    else

    {TmpWholeSaleDetailItemReport.PurchaseFine} = {TmpWholeSaleDetailItemReport.PurchaseFine} or
    {TmpWholeSaleDetailItemReport.ReturnFine} = {TmpWholeSaleDetailItemReport.ReturnFine}

//return subtrated two field value

  {TmpWholeSaleDetailItemReport.PurchaseFine} - {TmpWholeSaleDetailItemReport.ReturnFine} 

now its showing error i.e. The remaining text does not appear to the part of the formula. I dont know whats the error indicating. I think so formula syntax is incorrect or something else.

Aucun commentaire:

Enregistrer un commentaire