Broken reports due to casing change
Closed this issue · 5 comments
In prior versions of jsreport properties were always camelCased. But due to changes in this commit properties are now cased the same as the .net model (which are PascalCased). This discrepancy broke all our existing reports. Some of them thousands of lines big, spread over multiple separate files.
I'm pleading for either reverting this change or a way to configure the ContractResolver ourselves.
Sorry to hear that. My apologies. Unfortunately, this was a bug but that had to be fixed.
I take a look if we can make it configurable for you now.
Thank you for your quick response. We will revert to an older version of jsreport for now.
I hve the changes ready. I wanted to double-check it here with you before I push it.
The custom contract resolver for data property can be passed to both jsreport.Local
new LocalReporting()
.UseBinary(JsReportBinary.GetBinary())
.UseContractResolverForDataProperty(new CamelCasePropertyNamesContractResolver())
.AsUtility()
.Create();
As well as to jsreport.Client
new ReportingService("http://localhost:5488") {
ContractResolverForDataProperty = new CamelCasePropertyNamesContractResolver()
}
This should work as back-compatibility flag and is applied just globally for all rendering requests called on the particular IRenderService
instance. Is this fine for you?
Hi, sorry for my late answer.
Yes, this seems fine to me.
Thank you very much.
This is now released in
jsreport.Client@3.1.0
jsreport.Local@2.3.0
I apologize for your original troubles.