Data source for polymorphic data
Posted: Mon May 29, 2017 1:29 pm
Hello guys,
Here's our problem. If I create data set using the following object
The designer would recognize and display only properties form the first item ignoring the rest. The only way we've found to design report for all possible item types is by putting item of each type
first, one by one. It might be an OK option for one time edit, but would be really annoying to do this on regular basis.
The only option I see is to merge all item objects into one and pass to readJson. But this means we screw up the preview, since the first item is a mutant type composed of all possible item types.
Is there a way to provide data and schema separately? Or maybe there's another solution. Will appreciate anything that'd help.
Thanks!
Here's our problem. If I create data set using the following object
Code: Select all
let jsonObj = {
items: [
{
prop1:"...",
prop2:"..."
},
{
prop1:"...",
prop3:"..." // this prop doesn't existing in the first item
}]
}
first, one by one. It might be an OK option for one time edit, but would be really annoying to do this on regular basis.
The only option I see is to merge all item objects into one and pass to readJson. But this means we screw up the preview, since the first item is a mutant type composed of all possible item types.
Is there a way to provide data and schema separately? Or maybe there's another solution. Will appreciate anything that'd help.
Thanks!