Using of arrays of JSON objects with mixed-type properties is not officially supported by LINQ Reporting Engine: some cases may occasionally work, whereas others may not, which may lead to further complications. So, generally, we would recommend to get rid of an array of such objects and use separate objects instead.
If this is not possible, then, in this partcular case, disabling of parsing of date-time values should help. This can be done as follows:
ArrayList<String> formats = new ArrayList();
JsonDataLoadOptions options = new JsonDataLoadOptions();
options.setExactDateTimeParseFormats(formats);
JsonDataSource dataSource = new JsonDataSource(..., options);
Instead of complete disabling, parsing of date-time values can be fine-tuned to include only necessary date-time formats instead. See Accessing JSON Data for more information.
We have added the date formats as you suggested and this solves the issue we were having.
On the same template we have a chart and the date format change has caused the x axis to become illegible (see attached). The axis type is set as a Date axis.
The json for the chart has the date value formatted as “6/30/19”.
Does setting the dateTime formats not cascade to charts?
JsonDataLoadOptions affect loading of a whole JSON file. As mentioned in my previous comment, you can try setting date-time parse formats explicitly like this:
ArrayList<String> formats = new ArrayList();
formats.add("M/d/yy");
JsonDataLoadOptions options = new JsonDataLoadOptions();
options.setExactDateTimeParseFormats(formats);
JsonDataSource dataSource = new JsonDataSource(..., options);
1 Like
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.