Converting Formulas from Crystal Reports

Сonversation on different topics
Post Reply
Tusk24
Posts: 3
Joined: Tue May 15, 2018 3:35 pm

Converting Formulas from Crystal Reports

Post 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.
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Converting Formulas from Crystal Reports

Post 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.
Post Reply