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
close icon
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.

ReportViewer information

Hi,
I'm trying to use the ReportViewer component for a project with the following architecture:

  • _ VisualStudio 2013;
  • _ C # / MVC 5 / Framework 4.5.1 / Razor;
  • _ AngularJs 1.4.1;
  • _ Microsoft SqlServer Reporting Services 2014;
  • _ Microsoft SqlServer Analysis Service 2014;

I downloaded version Essential Studio for ASP.NET MVC version 13.xe through Syncfusion Dashboard I created a sample project with the characteristics described above.

But now I have to face the problems and do not know how to proceed, the reference I found few indications, below the code that, by example, I implemented:

/* ***** .cshtml ***** */
@using Syncfusion.MVC.EJ
@using Syncfusion.JavaScript
@ {
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>ReportViewer Features:</h2>
<br />
<div>
    @(Html.EJ().ReportViewer("reportviewer").ReportServiceUrl("/api/ReportAPI"))
</div>
@(Html.EJ().ScriptManager())


/* ***** .cs ***** */
using Syncfusion.EJ;
using Syncfusion.EJ.ReportViewer;
using Syncfusion.JavaScript;
using Syncfusion.JavaScript.Models;
using Syncfusion.JavaScript.ReportViewerEnums;
.... using library microsoft

namespace MvcApplication1.Controllers
{
    public partial class ReportViewerController : Controller
{
// GET: /Report/
        public ActionResult ReportViewerFeatures()
{
            return View();
}
}
    public class ReportAPIController : ApiController, IReportController
{
        public object PostReportAction(Dictionary<string, object> jsonResult)
{
            return ReportHelper.ProcessReport(jsonResult, this);
}
        [System.Web.Http.ActionName("GetResource")]
        [System.Web.Http.AcceptVerbs("GET")]
        public object GetResource(string key, string resourcetype, bool isPrint)
{
            return ReportHelper.GetResource(key, resourcetype, isPrint);
}
        public void OnInitReportOptions(ReportViewerOptions reportOption)
{
// set server
            reportOption.ReportModel.ReportServerUrl = "http://<my server>/ReportServer";
            reportOption.ReportModel.ProcessingMode = Syncfusion.EJ.ReportViewer.ProcessingMode.Remote;
// set report name
            reportOption.ReportModel.ReportPath = "/TestAnalisys"; // my test report name
// set report credential for reportingservice
            reportOption.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("<my username>", "<my password>", "<my domain>");
// get datasource
// how to get list of datasources ???
// how to change connection string for exist datasource ??? (used MS Reporting Server - Expression Base (CUSTOM_DATA))
// set datasource credentials
            reportOption.ReportModel.DataSourceCredentials.Clear();
            reportOption.ReportModel.DataSourceCredentials.Add(new Syncfusion.Reports.EJ.DataSourceCredentials("DataSourceTest", "<my domain>\\<my username>", "<my password>"));
// set datasource
            reportOption.ReportModel.DataSources.Clear();
            reportOption.ReportModel.DataSources.Add(new Syncfusion.Reports.EJ.ReportDataSource("DataSourceTest", null));
// how to get list of existing parameter & change that ???
}
        public void OnReportLoaded(ReportViewerOptions reportOption)
{
}
}
}


My problems are:

  • _ visualize correctly the report if the database is sql server, if you analisys server I see the report but no data;
  • _ How do I get a list of datasource? At this stage I have to be able to read and change the connection string to insert custom_data;
  • _ How do I get a list of parameters?


can you help me?

Best Regards



3 Replies

SR Soundara Rajan S Syncfusion Team July 7, 2015 12:39 PM UTC

Hi Maurizio,

Thanks for using Syncfusion products.

I'm trying to use the ReportViewer component for a project with the following architecture:
  • _ VisualStudio 2013;
  • _ C # / MVC 5 / Framework 4.5.1 / Razor;
  • _ AngularJs 1.4.1;
  • _ Microsoft SqlServer Reporting Services 2014;
  • _ Microsoft SqlServer Analysis Service 2014;
I downloaded version Essential Studio for ASP.NET MVC version 13.xe through Syncfusion Dashboard I created a sample project with the characteristics described above.
But now I have to face the problems and do not know how to proceed, the reference I found few indications, below the code that, by example, I implemented:
_ visualize correctly the report if the database is sql server, if you analisys server I see the report but no data;

As of now, ReportViewer does not support to load data from SSAS(SQL Server Analysis Service). We have considered this as feature request “SSAS Query support in ReportViewer”, however to access this, we request you contact us at Syncfusion Support or you may also create your customer account under Direct Trac and open a new incident so that our support engineer will assist you accordingly.


Our Direct Trac support system can be accessed from the following link:


https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

_ How do I get a list of datasource? At this stage I have to be able to read and change the connection string to insert custom_data;
You can modify the connection string of the datasource at runtime by using parameters expressions. We have prepared sample based on this and it can be downloaded from below location,
http://www.syncfusion.com/downloads/support/forum/119520/ReportViewerDemo19277652.zip
_ How do I get a list of parameters?
You can get/set list of Report Parameters in IReportController as shown in below code snippet,

public void OnReportLoaded(ReportViewerOptions reportOption)

{

var _params = ReportHelper.GetParameters();

List<ReportParameter> _param = new List<ReportParameter>();

_param.Add(new ReportParameter() { Name = _params[0].Name, Labels = new List<string>() { "A" }, Values = new List<string>() { "A" } });

_param.Add(new ReportParameter() { Name = _params[1].Name, Labels = new List<string>() { "localhost" }, Values = new List<string>() { "localhost" } });

reportOption.ReportModel.Parameters = _param;
}


For your convenience, we have prepared sample based on this and it can be downloaded from below location,
http://www.syncfusion.com/downloads/support/forum/119520/ReportViewerDemo19277652.zip

Please let us know, if you have any concerns.

Regards,
Soundara Rajan S.


UN Unknown July 8, 2015 07:25 AM UTC

Thanks for the answer, 
unfortunately, our reports have only SSAS as a datasource.

Best Regards
Maurizio Verderio


SR Soundara Rajan S Syncfusion Team July 9, 2015 02:21 PM UTC

Hi Maurizio,

We have updated the details regarding this feature in the incident created under your account to access this, we request you contact us at Syncfusion Support. Our Direct Trac support system can be accessed from the following link:
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know, if you have any concerns.

Regards,
Soundara Rajan S.

Loader.
Live Chat Icon For mobile
Up arrow icon