Hello Telerik Team,
I am using Telerik Standalone Designer.
IsNull Function is not working for me.
=IsNull(Fields.status, " ")
My Response is "status": null,
It showing an error like this. "textbox cannot perform "=" Operation on Newtonsoft.Json.Linq.Jvalue and System.String"
i have attached screenshot of the error for the more information to help you.
Please Reply as soon as Possible.
Thanks In Advance.
4 Answers, 1 is accepted
From the error message, I suspect that status contains jvalue. Then IsNull compares different types of data and the exception is thrown. I will need more details about the scenario of the report and the context of IsNull. What kind of datasource do you use in the report and what is the data type of the status field?
Regards,
Neli
Progress Telerik

Hi Neli,
I'm experiencing similar behavior. When I use a "Web Service Data Source" and check if a property of the result is null, it always returns false. I assume because the underlying object is an empty JValue. When I use the IsNull function I get the same error as Bharat has reported above.
Based on the following JSON, when the "prop2" is null, I'd like to hide a panel that contains a text box displaying the "innerVal".
{
"prop1"
:
"simpleValue"
,
"prop2"
: {
"innerVal"
:
"simpleValue"
}
}
I tried that by assigning a conditional formatting rule to the panel that hides the panel when
Expression: = Fields.prop2
Operator: =
Value: Null
But that didn't work.
How would I display/hide some content of the report in case the value is not provided in the JSON result?
Thanks
Matthias
We already know about this unexpected behavior which is cased by a bug. It is already logged in our Feedback portal - JsonDataSource evaluates NULL values incorrectly. Feel free to vote for it to increase its priority.
Regards,
Neli
Progress Telerik

I was able to workaround this issue by converting the offending field to a string (= CStr(Fields.YourField)) And then using a Sum/Iif statement to make the column invisible if there were no values in it.
= Sum(IIf(IsNull(CStr(Fields.YourField),0)="",0,1)) = =0
Hopefully this helps someone else and saves them some time.