[]
        
(Showing Draft Content)

GrapeCity.ActiveReports.Web.Viewer.ReportViewerConfiguration.UseReportProvider

UseReportProvider Method

UseReportProvider(IReportProvider)

Uses a custom report store provider.

Declaration
public ReportViewerConfiguration UseReportProvider(IReportProvider reportProvider)
Parameters
Type Name Description
IReportProvider reportProvider

The custom report store provider.

Returns
Type Description
ReportViewerConfiguration

The current ReportViewerConfiguration instance.

Examples
app.UseReportViewer(config =>
{
	// Your implementation of IReportProvider.
	config.UseReportProvider(reportProvider);
});
Exceptions
Type Condition
ArgumentNullException

Thrown if reportProvider is null.

UseReportProvider(GetReportFn, GetReportDescriptorFn)

Uses a custom report simplistic provider.

Declaration
public ReportViewerConfiguration UseReportProvider(GetReportFn getReport, GetReportDescriptorFn getReportDescriptor)
Parameters
Type Name Description
GetReportFn getReport

A delegate GetReportFn that retrieves the report for the specified report identifier.

GetReportDescriptorFn getReportDescriptor

A delegate GetReportDescriptorFn that retrieves the report descriptor for the specified report identifier.

Returns
Type Description
ReportViewerConfiguration

The current ReportViewerConfiguration instance.

Examples
Stream GetReport(string reportId)
{
	// Your implementation of getting a report.
}

ReportDescriptor GetReportDescriptor(string reportId)
{
	// Your implementation of getting a report description.
}

app.UseReportViewer(config =>
{
	config.UseReportProvider(GetReport, GetReportDescriptor);
});
Exceptions
Type Condition
ArgumentNullException

Thrown if getReport or getReportDescriptor is null.