BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi,
I'm trying to use the ReportViewer component for a project with the following architecture:
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:
can you help me?
Best Regards
I'm trying to use the ReportViewer component for a project with the following architecture:
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,
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 |