Class ReportHelper
Contains helper methods to process the report.
Inheritance
Namespace: BoldReports.Web.ReportViewer
Assembly: BoldReports.Web.dll
Syntax
public static class ReportHelper : Object
Properties
ReportingServer
Gets or sets the reporting server details to load report from server.
Declaration
public static ReportingServer ReportingServer { get; set; }
Property Value
Type | Description |
---|---|
ReportingServer | The collections of reporting server details. |
ReportServiceURL
Get or Set URL value to connect with another Report Viewer WEB API service URL to process the report.
Declaration
public static string ReportServiceURL { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string containing the url to connect the WEB API service. |
ServiceAuthorizationToken
Authorization token to connect with the WEB API service provided in the ReportServiceURL property.
Declaration
public static string ServiceAuthorizationToken { get; set; }
Property Value
Type | Description |
---|---|
System.String | A string containing the token to connect the WEB API service. |
Methods
GetDataSetNames(Dictionary<String, Object>, IReportController, IMemoryCache)
Returns the dataset names that are used in the current report.
Declaration
public static IList<string> GetDataSetNames(Dictionary<string, object> jsonArray, IReportController reportController, IMemoryCache memoryCache)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | jsonArray | A collection of keys and values to process the report. |
IReportController | reportController | The object that contains methods to process the report. |
Microsoft.Extensions.Caching.Memory.IMemoryCache | memoryCache | Contains a local in-memory cache whose values are not serialized. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> | A list of string objects that contain the dataset names used in report. |
GetDataSources(Dictionary<String, Object>, IReportController, IMemoryCache, Boolean)
Returns the data sources that are used in the current report.
Declaration
public static List<DataSourceInfo> GetDataSources(Dictionary<string, object> jsonArray, IReportController reportController, IMemoryCache memoryCache, bool includeAllSources = false)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | jsonArray | A collection of keys and values to process the report. |
IReportController | reportController | The object that contains methods to process the report. |
Microsoft.Extensions.Caching.Memory.IMemoryCache | memoryCache | Contains a local in-memory cache whose values are not serialized. |
System.Boolean | includeAllSources | Optional. The default value is false. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<DataSourceInfo> | A list of DataSourceInfo objects that contain the report data source informations |
GetParameters(Dictionary<String, Object>, IReportController, IMemoryCache)
Process and returns the parameters that are used in the current report.
Declaration
public static ReportParameterInfoCollection GetParameters(Dictionary<string, object> jsonArray, IReportController reportController, IMemoryCache memoryCache)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | jsonArray | A collection of keys and values to process the report. |
IReportController | reportController | The object that contains methods to process the report. |
Microsoft.Extensions.Caching.Memory.IMemoryCache | memoryCache | Contains a local in-memory cache whose values are not serialized. |
Returns
Type | Description |
---|---|
BoldReports.Web.ReportParameterInfoCollection | The BoldReports.Web.ReportParameterInfoCollection object that contain list of report parameter without values. |
GetParametersWithValues(Dictionary<String, Object>, IReportController, IMemoryCache)
Returns the report paramters with data values that are used in the current report.
Declaration
public static ReportParameterInfoCollection GetParametersWithValues(Dictionary<string, object> jsonArray, IReportController reportController, IMemoryCache memoryCache)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | jsonArray | A collection of keys and values to process the report. |
IReportController | reportController | The object that contains methods to process the report. |
Microsoft.Extensions.Caching.Memory.IMemoryCache | memoryCache | Contains a local in-memory cache whose values are not serialized. |
Returns
Type | Description |
---|---|
BoldReports.Web.ReportParameterInfoCollection | The BoldReports.Web.ReportParameterInfoCollection object that contain list of report parameter with values. |
GetReport(String, String, IReportController, IMemoryCache)
Returns the stream of the exported report in the given document format.
Declaration
public static Stream GetReport(string reportViewerInstanceId, string format, IReportController reportController, IMemoryCache memoryCache)
Parameters
Type | Name | Description |
---|---|---|
System.String | reportViewerInstanceId | The unique id of the Report Viewer current request instance. |
System.String | format | The format in which to export the report. For supported formats WriterFormat |
IReportController | reportController | The object that contains methods to process the report. |
Microsoft.Extensions.Caching.Memory.IMemoryCache | memoryCache | Contains a local in-memory cache whose values are not serialized. |
Returns
Type | Description |
---|---|
System.IO.Stream | A stream object containing the exported report. |
GetReportingServer(Dictionary<String, Object>, IReportController, IMemoryCache)
Returns the report server that is used to process the current report.
Declaration
public static ReportingServer GetReportingServer(Dictionary<string, object> jsonArray, IReportController reportController, IMemoryCache memoryCache)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | jsonArray | A collection of keys and values to process the report. |
IReportController | reportController | The object that contains methods to process the report. |
Microsoft.Extensions.Caching.Memory.IMemoryCache | memoryCache | Contains a local in-memory cache whose values are not serialized. |
Returns
Type | Description |
---|---|
ReportingServer | The ReportingServer object of the current processing Reporting Server. |
GetResource(ReportResource, IReportController, IMemoryCache)
Send a GET request and returns the requested resource for a report.
Declaration
public static object GetResource(ReportResource resource, IReportController reportController, IMemoryCache memoryCache)
Parameters
Type | Name | Description |
---|---|---|
ReportResource | resource | Contains report resource information. |
IReportController | reportController | The object that contains methods to process the report. |
Microsoft.Extensions.Caching.Memory.IMemoryCache | memoryCache | Contains a local in-memory cache whose values are not serialized. |
Returns
Type | Description |
---|---|
System.Object | Resource object for the given key. |
ProcessReport(Dictionary<String, Object>, IReportController, IMemoryCache)
Processes the current report request and returns the report processed information.
Declaration
public static object ProcessReport(Dictionary<string, object> jsonArray, IReportController reportController, IMemoryCache memoryCache)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | jsonArray | A collection of keys and values to process the report. |
IReportController | reportController | The object that contains methods to process the report. |
Microsoft.Extensions.Caching.Memory.IMemoryCache | memoryCache | Contains a local in-memory cache whose values are not serialized. |
Returns
Type | Description |
---|---|
System.Object | An object containing the JSON result for the current report process request. |