Progress® Telerik® Reporting R3 2017

ReportViewerReportServiceClientFactory Property

Gets or sets the IReportServiceClientFactory that ReportViewer will use the next time a new instance of ReportServiceClient is required.

Namespace:  Telerik.ReportViewer.Silverlight
Assembly:  Telerik.ReportViewer.Silverlight (in Telerik.ReportViewer.Silverlight.dll)

Syntax

public IReportServiceClientFactory ReportServiceClientFactory { get; set; }

Property Value

Type: IReportServiceClientFactory

Remarks

The ReportViewer usually passes absolute Uri to the Create(Uri) method. For more information on how ReportServiceUri is resolved to absolute see EnsureAbsoluteUri(Uri).

Examples

This example illustrates how to implement and use a custom IReportServiceClientFactory.
using System;
using System.ServiceModel;
using System.Windows.Controls;
using Telerik.Reporting.Service.SilverlightClient;
using Telerik.ReportViewer.Silverlight;

public partial class MainPage : UserControl, IReportServiceClientFactory
{
    public MainPage()
    {
        InitializeComponent();

        this.ReportViewer1.ReportServiceClientFactory = this;
    }

    ReportServiceClient IReportServiceClientFactory.Create(System.Uri remoteAddress)
    {
        var binding = new BasicHttpBinding() // or BasicHttpBinding(BasicHttpSecurityMode.Transport) overload if SSL is used
        {
            MaxBufferSize = int.MaxValue,
            MaxReceivedMessageSize = int.MaxValue,
            ReceiveTimeout = new TimeSpan(0, 15, 0),
            SendTimeout = new TimeSpan(0, 15, 0)
        };

        var endpointAddress = new EndpointAddress(remoteAddress);

        return new ReportServiceClient(binding, endpointAddress);

    }
}

See Also