ReportViewer services
RDL Report Services
URL: http://js.syncfusion.com/demos/ejServices/api/ReportViewer/PostReportAction
Parameter
ReportLoad
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to load the report
|
controlId
|
String
|
Control ID of the widget
|
reportPath
|
String
|
Report path of the report
|
reportServerUrl
|
String
|
Specify the Report Server url to accessing the report
|
processingMode
|
String
|
Specify the processing mode of the report
|
GetDatasourceCredential
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to get the Datasource credential
|
dataSources
|
JSON
|
Datasource of the report
|
parameters
|
String
|
Specify the parameter collections
|
ValidateDSCredential
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to validate the datasource credential
|
dataSources
|
JSON
|
Datasource of the report
|
UpdateDSCredential
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to update the datasource credential
|
dataSources
|
JSON
|
Datasource of the report
|
GetParameters
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to get the parameters
|
SetParameters
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to set the parameters
|
parameters
|
JSON
|
Specify the parameters details to set the parameters
|
UpdateParameters
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to update the parameters
|
update param
|
JSON
|
Specify the parameters details to update the parameters
|
UpdateDataSource
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to update the datasource
|
GetPageModel
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to get the page model
|
refresh
|
Boolean
|
Specify whether the report refresh or not
|
dataRefresh
|
Boolean
|
Specify whether the data refresh or not
|
pageIndex
|
Int
|
Specify the page index of the report
|
pageInit
|
Boolean
|
Specify whether the page initialized or not
|
isPrint
|
Boolean
|
Specify whether the page layout is print or not
|
GetPrintModel
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to get the print model
|
DrillDown
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to process drill down
|
pageIndex
|
Int
|
specify the page index of the report
|
toggleInfo
|
JSON
|
specify the toggle information to process toggle
|
refresh
|
Boolean
|
specify whether the report refresh or not
|
dataRefresh
|
Boolean
|
specify whether the data refresh or not
|
pageInit
|
Boolean
|
specify whether the page initialized or not
|
isPrint
|
Boolean
|
specify whether the page layout is print or not
|
ClearCache
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to clear the cache
|
DrillThrough
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to process the drill through
|
reportName
|
String
|
Specify the child report name to drill through navigation
|
parameters
|
JSON
|
Specify the parameters details to process drill through
|
authentication Key
|
String
|
Specify the authentication key to process drill through
|
Request
TS
import { Component } from '@angular/core';
@Component({
selector: 'ej-app',
templateUrl: 'src/reportviewer/reportviewer.component.html',
styleUrls: ['src/reportviewer/reportviewer.component.css']
})
export class ReportViewerComponent {
public serviceUrl: string;
public reportPath: string;
constructor() {
this.serviceUrl = 'http://js.syncfusion.com/ejservices/api/ReportViewer';
this.reportPath = 'GroupingAgg.rdl';
}
}
Response
Code: 200
Content-Type:”application/json:charset=utf-8”;
Response Text:
Browser will render the reportviewer control with specified RDL report.
URL: http://js.syncfusion.com/demos/ejServices/api/ReportViewer/OnInitReportOptions
Parameter
Parameter name
|
Data type
|
Description
|
controlId
|
string
|
Control ID of the widget
|
reportModel
|
property
|
Contains the collections of Report model items.
|
SubReportModel
|
property
|
Contains the collections of Sub Report model items.
|
Request
reportOption.ReportModel.ReportingServer = new ReportingServerExt();
reportOption.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("guest", "demo");
Response
Code: 200
Content-Type:”application/json:charset=utf-8”;
Response Text:
ReportOptions will be Initialized for RDL report
URL: http://js.syncfusion.com/demos/ejServices/api/ReportViewer/OnReportLoaded
Parameter
Parameter name
|
Data type
|
Description
|
controlId
|
string
|
Control ID of the widget
|
reportModel
|
property
|
Contains the collections of Report model items.
|
SubReportModel
|
property
|
Contains the collections of Sub Report model items.
|
Request
reportOptions.ReportModel.DataSources.Clear();
var DataSources = reportOptions.ReportModel.DataSources;
List<ReportParameter> parameters = new List<ReportParameter>();
parameters.Add(new ReportParameter() { Name = "InvoiceID", Labels = new List<string>() { "InvoiceID" }, Values = new List<string>() { "10250" } });
reportOptions.ReportModel.Parameters = parameters;
Response
Code: 200
Content-Type:”application/json:charset=utf-8”;
Response Text:
ReportOptions will be updated when loading the RDL report.
RDLC Report Services
URL: http://js.syncfusion.com/demos/ejServices/api/ReportViewer/PostReportAction
Parameter
ReportLoad
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to load the report
|
controlId
|
String
|
Control ID of the widget
|
reportPath
|
String
|
Report path of the report
|
reportServerUrl
|
String
|
Specify the Report Server url to accessing the report
|
processingMode
|
String
|
Specify the processing mode of the report
|
GetDatasourceCredential
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to get the Datasource credential
|
dataSources
|
JSON
|
Datasource of the report
|
parameters
|
String
|
Specify the parameter collections
|
ValidateDSCredential
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to validate the datasource credential
|
dataSources
|
JSON
|
Datasource of the report
|
UpdateDSCredential
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to update the datasource credential
|
dataSources
|
JSON
|
Datasource of the report
|
GetParameters
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to get the parameters
|
SetParameters
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to set the parameters
|
parameters
|
JSON
|
Specify the parameters details to set the parameters
|
UpdateParameters
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to update the parameters
|
update param
|
JSON
|
Specify the parameters details to update the parameters
|
UpdateDataSource
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to update the datasource
|
GetPageModel
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to get the page model
|
refresh
|
Boolean
|
Specify whether the report refresh or not
|
dataRefresh
|
Boolean
|
Specify whether the data refresh or not
|
pageIndex
|
Int
|
Specify the page index of the report
|
pageInit
|
Boolean
|
Specify whether the page initialized or not
|
isPrint
|
Boolean
|
Specify whether the page layout is print or not
|
GetPrintModel
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to get the print model
|
DrillDown
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to process drill down
|
pageIndex
|
Int
|
specify the page index of the report
|
toggleInfo
|
JSON
|
specify the toggle information to process toggle
|
refresh
|
Boolean
|
specify whether the report refresh or not
|
dataRefresh
|
Boolean
|
specify whether the data refresh or not
|
pageInit
|
Boolean
|
specify whether the page initialized or not
|
isPrint
|
Boolean
|
specify whether the page layout is print or not
|
ClearCache
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to clear the cache
|
DrillThrough
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to process the drill through
|
reportName
|
String
|
Specify the child report name to drill through navigation
|
parameters
|
JSON
|
Specify the parameters details to process drill through
|
authentication Key
|
String
|
Specify the authentication key to process drill through
|
Request
TS
import { Component } from '@angular/core';
@Component({
selector: 'ej-app',
templateUrl: 'src/reportviewer/reportviewer.component.html',
styleUrls: ['src/reportviewer/reportviewer.component.css']
})
export class ReportViewerComponent {
public serviceUrl: string;
public reportPath: string;
public reportData: any;
constructor() {
this.serviceUrl = 'http://js.syncfusion.com/demos/ejServices/api/ReportViewer';
this.reportPath = 'AreaCharts.rdlc"';
this.reportData = [{
value: [
{ SalesPersonID: 281, FullName: 'Ito', Title: 'Sales Representative', SalesTerritory: 'South West', Y2002: 0, Y2003: 28000, Y2004: 3018725 },
{ SalesPersonID: 282, FullName: 'Saraiva', Title: 'Sales Representative', SalesTerritory: 'Canada', Y2002: 25000, Y2003: 14000, Y2004: 3189356 },
{ SalesPersonID: 283, FullName: 'Cambell', Title: 'Sales Representative', SalesTerritory: 'North West', Y2002: 12000, Y2003: 13000, Y2004: 1930885 }
],
name: 'AdventureWorksXMLDataSet'
}];
}
}
Response
Code: 200
Content-Type:”application/json:charset=utf-8”;
Response Text:
Browser will render the reportviewer control with specified RDLC report.
URL: http://js.syncfusion.com/demos/ejServices/api/ReportViewer/OnInitReportOptions
Parameter
Parameter name
|
Data type
|
Description
|
controlId
|
string
|
Control ID of the widget
|
reportModel
|
property
|
Contains the collections of Report model items.
|
SubReportModel
|
property
|
Contains the collections of Sub Report model items.
|
Request
if (reportOption.ReportModel.IsDrillthroughReport)
return;
var reportName = reportOption.ReportModel.ReportPath;
reportOption.ReportModel.ReportPath = ReportViewerHelper.GetReportPath(reportOption.ReportModel.ReportPath);
if (reportName.Contains("Product Catalog.rdlc"))
{
reportOption.ReportModel.DataSources.Clear();
reportOption.ReportModel.DataSources.Add(new ReportDataSource { Name = "ProductCatalog", Value = ProductCatalog.GetData() });
}
Response
Code: 200
Content-Type:”application/json:charset=utf-8”;
Response Text:
ReportOptions will be Initialized for RDLC Report
URL: http://js.syncfusion.com/demos/ejServices/api/ReportViewer/OnReportLoaded
Parameter
Parameter name
|
Data type
|
Description
|
controlId
|
string
|
Control ID of the widget
|
reportModel
|
property
|
Contains the collections of Report model items.
|
SubReportModel
|
property
|
Contains the collections of Sub Report model items.
|
Request
var reportName = reportOption.ReportModel.ReportPath;
if (reportName.Contains("Region.rdlc"))
{
reportOption.ReportModel.DataSources.Clear();
reportOption.ReportModel.DataSources.Add(new ReportDataSource { Name = "StoreSales", Value = StoreSales.GetData() });
}
Response
Code: 200
Content-Type:”application/json:charset=utf-8”;
Response Text:
ReportOptions will be updated when loading the RDLC report.
SSRS Report Services
URL: http://js.syncfusion.com/demos/ejServices/api/ReportViewer/PostReportAction
Parameter
ReportLoad
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to load the report
|
controlId
|
String
|
Control ID of the widget
|
reportPath
|
String
|
Report path of the report
|
reportServerUrl
|
String
|
Specify the Report Server url to accessing the report
|
processingMode
|
String
|
Specify the processing mode of the report
|
GetDatasourceCredential
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to get the Datasource credential
|
dataSources
|
JSON
|
Datasource of the report
|
parameters
|
String
|
Specify the parameter collections
|
ValidateDSCredential
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to validate the datasource credential
|
dataSources
|
JSON
|
Datasource of the report
|
UpdateDSCredential
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to update the datasource credential
|
dataSources
|
JSON
|
Datasource of the report
|
GetParameters
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to get the parameters
|
SetParameters
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to set the parameters
|
parameters
|
JSON
|
Specify the parameters details to set the parameters
|
UpdateParameters
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to update the parameters
|
update param
|
JSON
|
Specify the parameters details to update the parameters
|
UpdateDataSource
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to update the datasource
|
GetPageModel
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to get the page model
|
refresh
|
Boolean
|
Specify whether the report refresh or not
|
dataRefresh
|
Boolean
|
Specify whether the data refresh or not
|
pageIndex
|
Int
|
Specify the page index of the report
|
pageInit
|
Boolean
|
Specify whether the page initialized or not
|
isPrint
|
Boolean
|
Specify whether the page layout is print or not
|
GetPrintModel
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to get the print model
|
DrillDown
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to process drill down
|
pageIndex
|
Int
|
specify the page index of the report
|
toggleInfo
|
JSON
|
specify the toggle information to process toggle
|
refresh
|
Boolean
|
specify whether the report refresh or not
|
dataRefresh
|
Boolean
|
specify whether the data refresh or not
|
pageInit
|
Boolean
|
specify whether the page initialized or not
|
isPrint
|
Boolean
|
specify whether the page layout is print or not
|
ClearCache
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to clear the cache
|
DrillThrough
Parameter name
|
Data type
|
Description
|
reportAction
|
JSON
|
Input data in the JSON format to process the drill through
|
reportName
|
String
|
Specify the child report name to drill through navigation
|
parameters
|
JSON
|
Specify the parameters details to process drill through
|
authentication Key
|
String
|
Specify the authentication key to process drill through
|
Request
TS
import { Component } from '@angular/core';
@Component({
selector: 'ej-app',
templateUrl: 'src/reportviewer/reportviewer.component.html',
styleUrls: ['src/reportviewer/reportviewer.component.css']
})
export class ReportViewerComponent {
public serviceUrl: string;
public reportPath: string;
public serverUrl: string;
constructor() {
this.serviceUrl = 'http://js.syncfusion.com/demos/ejServices/api/ReportViewer';
this.serverUrl = 'http://mvc.syncfusion.com/reportserver';
this.reportPath = '/SSRSSamples2/Territory Sales new';
}
}
Response
Code: 200
Content-Type:”application/json:charset=utf-8”;
Response Text:
Browser will render the reportviewer control with specified SSRS report.
URL: http://js.syncfusion.com/demos/ejServices/api/ReportViewer/OnInitReportOptions
Parameter
Parameter name
|
Data type
|
Description
|
controlId
|
string
|
Control ID of the widget
|
reportModel
|
property
|
Contains the collections of Report model items.
|
SubReportModel
|
property
|
Contains the collections of Sub Report model items.
|
Request
string reportserverUrl = WebConfigurationManager.AppSettings["ReportServerUrl"];
reportOption.ReportModel.ReportServerUrl = reportserverUrl;
reportOption.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("ssrs", "RDLReport1");
reportOption.ReportModel.DataSourceCredentials.Add(new DataSourceCredentials("NorthWindIO", "ssrs1", "RDLReport1"));
Response
Code: 200
Content-Type:”application/json:charset=utf-8”;
Response Text:
ReportOptions will be Initialized for SSRS report
URL: http://js.syncfusion.com/demos/ejServices/api/ReportViewer/OnReportLoaded
Parameter
Parameter name
|
Data type
|
Description
|
controlId
|
string
|
Control ID of the widget
|
reportModel
|
property
|
Contains the collections of Report model items.
|
SubReportModel
|
property
|
Contains the collections of Sub Report model items.
|
Request
reportOptions.ReportModel.DataSources.Clear();
var DataSources = reportOptions.ReportModel.DataSources;
List<ReportParameter> parameters = new List<ReportParameter>();
parameters.Add(new ReportParameter() { Name = "InvoiceID", Labels = new List<string>() { "InvoiceID" }, Values = new List<string>() { "10250" } });
reportOptions.ReportModel.Parameters = parameters;
Response
Code: 200
Content-Type:”application/json:charset=utf-8”;
Response Text:
ReportOptions will be updated when loading the SSRS report.
ReportViewerHelper
ReportViewerHelper class used to process the ReportViewer control in server side.
Methods:
ProcessReport(Dictionary<string, object> jsonResult, IReportController reportController)
Process the Report in Reportviewer Control with specified report details
Code snippet:
return.ProcessReport(jsonResult, this);
GetReport(string key, string type)
Getting the Report to be processed in Reportviewer Control
Code snippet:
return.GetReport(string key, string type);
GetResource(string key, string resourceType, bool isPrint)
Getting the Resource from Reportviewer Control and It will process the report Exporting.
Code snippet:
return.GetResource(string key, string resourceType, bool isPrint);
GetParameters()
Getting the Report Parameters of the Reportviewer Control
Code snippet:
return.GetParameters();
GetDataSources()
Getting the Report DataSource of the Reportviewer Control
Code snippet:
return.GetDataSources();
GetDataSetNames()
Getting the Report Dataset of the Reportviewer Control
Code snippet:
return.GetDataSetNames();