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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Data fetched but not rendered on browser

Thread ID:

Created:

Updated:

Platform:

Replies:

144869 May 27,2019 09:38 AM UTC Jul 11,2019 10:43 AM UTC jQuery 7
loading
Tags: ejReportViewer
Nishant
Asked On May 27, 2019 10:23 AM UTC

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

Vinoth Srinivasan [Syncfusion]
Replied On 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. 


Nishant
Replied On 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

Vinoth Srinivasan [Syncfusion]
Replied On 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. 


Nishant
Replied On 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?

Mahendran Shanmugam [Syncfusion]
Replied On 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. 


Nishant
Replied On 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

Mahendran Shanmugam [Syncfusion]
Replied On 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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon