Hi
On below code i am getting above error - If not(isNull({Command.DSCRIPTION})) and {Command.DSCRIPTION} <> ""
then (uppercase({Command.DSCRIPTION})) + ChrW(13) + strText
else
(uppercase({Command.TEXT}))
-------------------------------------------------------------
stringVar strtext = "";
If not(isNull({Command.Text}))
then strText = (uppercase({Command.TEXT}))
else
strText = ""
If not(isNull({Command.DSCRIPTION})) and {Command.DSCRIPTION} <> ""
then (uppercase({Command.DSCRIPTION})) + ChrW(13) + strText
else
(uppercase({Command.TEXT}))
Thanks

Tahir AnsariRank #366 · 6.8K reputationPosted Sep 23, 2023, 5:10 AM EDT
you're trying to build a string based on certain conditions. The error you're encountering is likely due to the syntax of your formula. Crystal Reports has its own syntax, and it's case-sensitive:
stringVar strText := ""; if not isNull({Command.Text}) then strText := uppercase({Command.Text}); if not isNull({Command.DSCRIPTION}) and {Command.DSCRIPTION} <> "" then uppercase({Command.DSCRIPTION}) + ChrW(13) + strText else strTextPlease make sure that the field names are correctly spelled and that they exist in the dataset you're working with in your Crystal Reports report.