Json datasource does not show some nested objects
Hi,
I'm trying to create a report with a json structure as datasource. I'm giving a text file with the json as a source and the procedure completed successfully. The object, "reportItem", I'm passing has various simple properties (int, text, datetime etc) and two (2) arrays of objects, namely "factors" and "subItems". When I inspect the datasource in the datasources window, I can see both, but only the second one, "subItems" shows substructure, i.e. properties which I can drag-n-drop in the designer. The first one, "factors", shows the substructure "index", "item", "array", but there is no (+) sign next to the "item" so that it can be expanded so that its inner properties be accessed.
Any ideas?
Thanks,
Alex
This discussion has been closed.
Comments
Hello!
Register the connection using
`RegisteredObjects.AddConnection(typeof(JsonDataSourceConnection))`.If you change the structure of the JSON example, be sure to update the connection schema (so that FastReport rescans all properties) and check the column paths; for array elements, they are created as nodes such as ...factors.item.name, ...subItems.item.code.