ActiveReports 19 .NET Edition
MESCIUS.ActiveReports.Web.Viewer Assembly / GrapeCity.ActiveReports.Web.Viewer Namespace / ReportViewerConfiguration Class / UseReportProvider Method / UseReportProvider(GetReportFn,GetReportDescriptorFn) Method
A delegate GetReportFn that retrieves the report for the specified report identifier.
A delegate GetReportDescriptorFn that retrieves the report descriptor for the specified report identifier.
Example

In This Topic
    UseReportProvider(GetReportFn,GetReportDescriptorFn) Method
    In This Topic
    Uses a custom report simplistic provider.
    Syntax
    'Declaration
     
    Public Overloads Function UseReportProvider( _
       ByVal getReport As GetReportFn, _
       ByVal getReportDescriptor As GetReportDescriptorFn _
    ) As ReportViewerConfiguration

    Parameters

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

    Return Value

    The current ReportViewerConfiguration instance.
    Exceptions
    ExceptionDescription
    Thrown if getReport or getReportDescriptor is null.
    Example
    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);
    });
    See Also