We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
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.

Data fetched but not rendered on browser

After successfully configuring the connection to report server, I got the desired report data in the network call but it does not getting rendered on UI. 
Please see attached screenshot.

Also in the parameter toolbar undefined is shown however prompt Id values in being fetched in network call. 

Could you please help me out with this. 

Attachment: Image1_7369fa7e.7z

7 Replies

VS Vinoth Srinivasan Syncfusion Team May 28, 2019 09:52 AM UTC

Hi Nishant, 

Thanks for your interest in our Syncfusion products. 

We were not able to reproduce the mentioned reports go’s blank and parameter name display undefined issue in browser. So, could you please share your issue reproducible report, script and assembly version to validate the mentioned problem at our end. 

Regards, 
Vinoth S. 



NI Nishant May 30, 2019 12:21 PM UTC

Hi,

I have found the reason related to issue of report not rendering on browser while the network call gives proper json data.
The issue is that in the network call I am getting json as camelcase for example, pageData. But if I change the json manually to pass it in Pascal case ie. PageData then the report get render on browser.

Please see attached screenshot in compressed file.

Could you please let me know how I can get json in Pascal case.

Attachment: Image01_51e0a435.zip


VS Vinoth Srinivasan Syncfusion Team June 3, 2019 06:17 AM UTC

Hi Nishant, 
 
Currently we don’t have option to use camelCase for ReportViewer control. Since we have used the PascalCase property for the resulted JSON value in WebAPI controller to process the report from server side. So, we cannot able to render the ReportViewer control from the JSON value with camelCase property. 
 
As of now 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. 
 
ReportApiController.cs 
namespace ReportViewerJS.Controllers 
{ 
    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 = new CamelCasePropertyNamesContractResolver() } 
            }; 
 
            controllerSettings.Formatters.Add(formatter); 
 
        } 
    } 
 
    [CamelCaseControllerConfig] // Requried camalCase class 
    public class SomeController : ApiController 
    { 
        //Sample class 
    } 
  
    [EnableCors(origins: "*", headers: "*", methods: "*")] 
    public class ReportApiController : ApiController,IReportController 
    { 
        //Post action for processing the rdl/rdlc report 
        public object PostReportAction(Dictionary < string, object > jsonResult) 
        {             
            return ReportHelper.ProcessReport(jsonResult, this); 
        } 
         
        //Get action for getting resources from the report 
        [System.Web.Http.ActionName("GetResource")] 
        [AcceptVerbs("GET")] 
        public object GetResource(string key, string resourcetype, bool isPrint) 
        { 
          return ReportHelper.GetResource(key, resourcetype, isPrint); 
        } 
 
        //Method will be called when initialize the report options before start processing the report  
        public void OnInitReportOptions(ReportViewerOptions reportOption) 
        {  
 
        } 
 
        //Method will be called when reported is loaded 
        public void OnReportLoaded(ReportViewerOptions reportOption) 
        { 
 
        } 
    } 
 
 
We have prepared a simple sample with RDL file (RDL file have dummy data) and it can be downloaded from below location. 
 
Let us know if you need any clarification. 
 
Regards, 
Vinoth S. 



NI Nishant replied to Vinoth Srinivasan June 4, 2019 07:41 AM UTC

Hi Nishant, 
 
Currently we don’t have option to use camelCase for ReportViewer control. Since we have used the PascalCase property for the resulted JSON value in WebAPI controller to process the report from server side. So, we cannot able to render the ReportViewer control from the JSON value with camelCase property. 
 
As of now 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. 
 
ReportApiController.cs 
namespace ReportViewerJS.Controllers 
{ 
    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 = new CamelCasePropertyNamesContractResolver() } 
            }; 
 
            controllerSettings.Formatters.Add(formatter); 
 
        } 
    } 
 
    [CamelCaseControllerConfig] // Requried camalCase class 
    public class SomeController : ApiController 
    { 
        //Sample class 
    } 
  
    [EnableCors(origins: "*", headers: "*", methods: "*")] 
    public class ReportApiController : ApiController,IReportController 
    { 
        //Post action for processing the rdl/rdlc report 
        public object PostReportAction(Dictionary < string, object > jsonResult) 
        {             
            return ReportHelper.ProcessReport(jsonResult, this); 
        } 
         
        //Get action for getting resources from the report 
        [System.Web.Http.ActionName("GetResource")] 
        [AcceptVerbs("GET")] 
        public object GetResource(string key, string resourcetype, bool isPrint) 
        { 
          return ReportHelper.GetResource(key, resourcetype, isPrint); 
        } 
 
        //Method will be called when initialize the report options before start processing the report  
        public void OnInitReportOptions(ReportViewerOptions reportOption) 
        {  
 
        } 
 
        //Method will be called when reported is loaded 
        public void OnReportLoaded(ReportViewerOptions reportOption) 
        { 
 
        } 
    } 
 
 
We have prepared a simple sample with RDL file (RDL file have dummy data) and it can be downloaded from below location. 
 
Let us know if you need any clarification. 
 
Regards, 
Vinoth S. 


Thanks for the solution. It work for me.

I am facing one more issue regarding Data source credentials. Our SSRS reports server is deployed on different machine remotely and also it has its own configuration based on reports requirement. For example Report A  will fetch data from Database A and Report B will fetch data from Database B. When we run through ASP.NET Reportviewer, we do not provide any database credential and it works. How can I achieve this using Syncfusion ReportViewer?


MS Mahendran Shanmugam Syncfusion Team June 5, 2019 07:07 AM UTC

Hi Nishant, 
 
If you like to rendering the report without passing the datasource credentials then you can create the datasource with “do not use credential option”. Please find the below help documentation, we have to use execution account to make use of the credential information in connection string.   
 
   
 
We can update the unattended execution account by using Reporting Services configuration manager.  
 
   
 
Regards, 
Mahendran S. 



NI Nishant replied to Mahendran Shanmugam July 11, 2019 10:23 AM UTC

Hi Nishant, 
 
If you like to rendering the report without passing the datasource credentials then you can create the datasource with “do not use credential option”. Please find the below help documentation, we have to use execution account to make use of the credential information in connection string.   
 
   
 
We can update the unattended execution account by using Reporting Services configuration manager.  
 
   
 
Regards, 
Mahendran S. 


Hi,

Is there any way to bypass below line of code for data source connectivity as it is already been configured in Report Server. Why below line is needed if the SSRS report server is configured with the data source credential.

reportOption.ReportModel.DataSourceCredentials.Add(new Syncfusion.Reports.EJ.DataSourceCredentials("DBNAME", "Username", "Password"));

If this code is exclude, then every time I fetch a report it prompt for data source credential. 

Thanks,
Nishant


MS Mahendran Shanmugam Syncfusion Team July 11, 2019 10:43 AM UTC

Hi Nishant, 

We are using the SSRS server to get the report alone and all other reporting process with processed from application. In the case of having  credentials of your datasource with Reporting Server, we could not able to get the stored password from server with the reason of restrictions with server for security. So, if you are using save password option for datasourrce and available in server then you need to pass the credential using the API as suggested in our earlier update. 

Regards, 
Mahendran S. 


Loader.
Up arrow icon