Page 1 of 1

Converting Formulas from Crystal Reports

Posted: Tue May 15, 2018 3:40 pm
by Tusk24
We just upgraded our company software which used to use Crystal Reports and now uses Stimulsoft. We had quite a few custom reports and I'm trying to learn the new syntax in Stimulsoft. Can someone help me with this particular conversion?

I had the following in crystal as an if, else statement with a Date field:

if isnull({OrderDet.User_Date1}) then "statement" else
if ToText({OrderDet.User_Date1},"M/d/yy") = "11/11/11" then "Not Available" else
if ToText({OrderDet.User_Date1},"M/d/yy") = "12/12/12" then "*See Below*" else ToText({OrderDet.User_Date1},"M/d/yy")

The ToText and M/d/yy was because we were just trying to match up the result to a specific date. Any help is appreciated.

Re: Converting Formulas from Crystal Reports

Posted: Thu May 17, 2018 7:15 am
by Lech Kulikowski
Hello,

Please try to use the following expression:

Code: Select all

{IIF(IsNull(OrderDet, "User_Date1"),"statement", IIF(OrderDet.User_Date1.ToString("M/d/yy") == "11/11/11", "Not Available", 
IIF(OrderDet.User_Date1.ToString("M/d/yy") == "12/12/12", "*See Below*", OrderDet.User_Date1.ToString("M/d/yy"))))}
Thank you.