Crystal report formula workshop simple if not working
I have to make a simple change to a report done by another developer and if I edit the "ShowAverageSpeed" formula in VS2010 I can see the formula as: if ({AXMXmlJob.AverageSpeed} = 0 ) Then "Stopped" Else "Moving"
I save the formula in the Formula Workshop but when I try to view the report on the website I get: "A string is required here."
If I remove this from the report it renders fine so I am sure this is where the error is. AXMXmlJob.AverageSpeed is nvarchar(50) null but if I try to use if ({AXM开发者_开发百科XmlJob.AverageSpeed} = "0" ) the it complains that it is expecting a number?
It needs the same data type on both ends. Try this:
if (ToNumber({AXMXmlJob.AverageSpeed}) = 0 ) Then "Stopped" Else "Moving"
精彩评论