Conditional espression check on division by 0 produces error
Posted: Tue Apr 02, 2019 5:39 pm
Hello,
I've been struggling with this for about half a day now. I am trying to enter an expression into our report editor.
I have read other posts stating that IIF conditions evaluate all arguments, and that the solution was to use this conditional syntax, however doing so does not work. If I remove the "/root.Total_Distance" on the last line, everything is fine.
What is wrong with my code?
Cheers,
Stan
I've been struggling with this for about half a day now. I am trying to enter an expression into our report editor.
Code: Select all
{root.Total_Distance==0?
"? Dist":
(root.Total_Volume==0?
"? Vol":
(root.Total_Volume/root.Total_Distance).ToString())}
What is wrong with my code?
Cheers,
Stan