Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Crystal Report Formula French Salutation

I have this code below I'm not sure why it is nto running properly. WHen i run each separately, they all work but for some reason when i put them together in a longer formula

If IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "M.*")

then "Monsieur " + " " + {GfCnBio.GfCnBio_Last_Name}

Else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "M.*")

then "Monsieur " + " " + {GfCnBio.GfCnBio_Last_Name} + " " + "Madame " + {GfCnBio.GfCnBio_Last_Name}

else if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "M. et Mme.*")

then "Monsieur " + " " + {GfCnBio.GfCnBio_Last_Name}

else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "M. et Mme.*")

then "Monsieur " + " " + {GfCnBio.GfCnBio_Last_Name} + " " + "Madame " + {GfCnBio.GfCnBio_Last_Name}

else if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "Me.*")

then "Madame " + " " + {GfCnBio.GfCnBio_Last_Name}

else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "Me.*")

then "Madame " + " " + {GfCnBio.GfCnBio_Last_Name} + " " + "Monsieur " + {GfCnBio.GfCnBio_Last_Name}

else if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "Madam*")

then "Madame " + " " + {GfCnBio.GfCnBio_Last_Name}

else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "Madam*")

then "Madame " + " " + {GfCnBio.GfCnBio_Last_Name} + " " + "Monsieur " + {GfCnBio.GfCnBio_Last_Name}

else if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "M.*")

then "Monsieur " + " " + {GfCnBio.GfCnBio_Last_Name}

else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and (Trim ({GfCnBio.GfCnBio_Title_1}) like "M.*")

then "Monsieur " + " " + {GfCnBio.GfCnBio_Last_Name} + " " + "Madame " + {GfCnBio.GfCnBio_Last_Name}

else if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and

(Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme.*" or Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme")

then "Madame " + " " + {GfCnBio.GfCnBio_Last_Name}

else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and

(Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme.*" or Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme")

then "Madame " + " " + {GfCnBio.GfCnBio_Last_Name} + " " + "Monsieur" + {GfCnBio.GfCnBio_Last_Name}

else if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and

(Trim ({GfCnBio.GfCnBio_Title_1}) like "Mlle." or Trim ({GfCnBio.GfCnBio_Title_1}) like "Mlle")

then "Madame " + " " + {GfCnBio.GfCnBio_Last_Name}

else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and

(Trim ({GfCnBio.GfCnBio_Title_1}) like "Mlle." or Trim ({GfCnBio.GfCnBio_Title_1}) like "Mlle")

then "Madame " + " " + {GfCnBio.GfCnBio_Last_Name} + " " + "Monsieur " + {GfCnBio.GfCnBio_Last_Name}

else

"Madame, Monsieur"

when i run the above formula i do not get all the results i need.

but when i run the below part of the formula separetly, i get the results that i am missing from the above formula. I am not sure what i could be doing wrong here...

if IsNull({GfCnBio.GfCnBio_Spouse_ID}) and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and

(Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme.*" or Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme")

then "Madame " + " " + {GfCnBio.GfCnBio_Last_Name}

else if {GfCnBio.GfCnBio_Spouse_ID} <> 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"

and {GfCnAttrCat_4.GfCnAttrCat_4_Description} = "French" and

(Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme.*" or Trim ({GfCnBio.GfCnBio_Title_1}) like "Mme")

then "Madame " + " " + {GfCnBio.GfCnBio_Last_Name} + " " + "Monsieur" + {GfCnSpSpBio.GfCnSpSpBio_Last_Name}

Not what you were looking for? View more on this topic or Ask a question