Starting in 2019, the Reporting control is no longer included in Essential Studio®. If you're experiencing issues with the Syncfusion� Reporting Platform, Report Viewer, Report Designer, or Report Writer, we recommend migrating to Bold Reports, our dedicated reporting platform.
Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.
We thank you for choosing Syncfusion� and appreciate your understanding.
Bold Reports offers a comprehensive suite of tools and features for all your reporting needs, and we will help you make a smooth transition from the discontinued control. Our support team at https://support.boldreports.com/ is here to assist you with any questions or difficulties you may encounter during the migration process.
We thank you for choosing Syncfusion� and appreciate your understanding.
WebApi Json Formatter
Hello, i have a web api service with the CamelCasePropertyNamesContractResolver as contract resolver and the report viewer is not working, if i change this to DefaultContractResolver, the report viewer works.
there is any way to make it work with the camel case?
Thanks
SIGN IN To post a reply.
1 Reply
YD
Yuvaraj Devarajan
Syncfusion Team
May 11, 2017 04:39 AM UTC
Hi Gabriel,
Thanks for contacting Syncfusion support.
Currently we don’t have option to use camelCase for ReportViewer control. Since we have used the Pascal Case property for the resulted JSON value in WebAPI controller to process the report from server side. So We cannot able to decorate the camelCase JSON data to PascalCase format in IReportController. Instead of configuring the camelCase globally in Global.asax.cs file, we request you to create a “CamelCaseControllerConfigAttribute” class to decorate the camelCase for the required API classes using “CamelCaseControllerConfig” attribute as shown in below code example.
|
public class CamelCaseControllerConfigAttribute : Attribute, IControllerConfiguration
{
public void Initialize(HttpControllerSettings controllerSettings,HttpControllerDescriptor controllerDescriptor)
{
var formatter = controllerSettings.Formatters.OfType<JsonMediaTypeFormatter>().Single();
controllerSettings.Formatters.Remove(formatter);
formatter = new JsonMediaTypeFormatter
{
SerializerSettings = { ContractResolver = newCamelCasePropertyNamesContractResolver() }
};
controllerSettings.Formatters.Add(formatter);
}
}
[CamelCaseControllerConfig] // Requried camalCase class
public class SomeController : ApiController
{
//Sample class
}
|
Regards,
Yuvaraj D.
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
GA gabriel
- May 10, 2017 10:50 AM UTC
- May 11, 2017 04:39 AM UTC