I am calling a JSON Webservice that does not return a nested object if the values are null.
I am using the value of the nested object (Fields.Orders.Salesperon.Name) in a detail row of my report.
This results in an error for any rows with no salesperson: "The expression containt object 'Name' that is not defined in the current context".
Here's a sample of what's being returned from the webservice:
{
"Orders": [
{
"OrderNumber": 1,
"Salesperson: { "Name": "Joe Example" }
},
{
"OrderNumber": 2,
"Salesperson: {}
}
}
OrderNumber 1 will print fine. The row for OrderNumber 2 will have an error box.
Screenshot from the actual report:
How can I prevent this? I've tried null checks, value binding, conditional formatting... but it all throws an error because it's trying to access the nonexistent "Name" field on a record.