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.
Unfortunately, activation email could not send to your email. Please try again.

ReportViewer information

Thread ID:

Created:

Updated:

Platform:

Replies:

119520 Jul 3,2015 06:29 AM Jul 9,2015 10:21 AM ASP.NET MVC (Classic) 3
loading
Tags: ReportViewer
Maurizio Verderio
Asked On July 3, 2015 06:29 AM

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



Soundara Rajan S [Syncfusion]
Replied On July 7, 2015 08:39 AM

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.

Maurizio Verderio
Replied On July 8, 2015 03:25 AM

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

Best Regards
Maurizio Verderio

Soundara Rajan S [Syncfusion]
Replied On July 9, 2015 10:21 AM

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.

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.

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.

;