WCF Report Service to Silverlight Report Viewer Error.

4 posts, 0 answers
  1. Deylo Woo
    Deylo Woo avatar
    2 posts
    Member since:
    Aug 2012

    Posted 24 Feb 2010 Link to this post

    Hi,

    I am trying to implement Telerik Reporting in our Silverlight application, and I am having a problem connecting Telerik Report Services to a Silverlight Report Viewer.  In one solution I have a Windows Azure project running a Web Role that contains a WCF service (ReportService.svc) and a project with the Repors (ReportLibrary) as instructed on this video (http://tv.telerik.com/reporting/video/telerik-reporting-getting-started-with-silverlight-report-viewer), and on the other solution I have a Silverlight app with a Silverlight Report Viewer.  When I try to setup the Silverlight client I get an error. (see image attachment).

    The XAML code looks like this on the client side.

    <UserControl x:Class="ROPComposite.Report.Telerik_Report.TelerikReportView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:reportViewer="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight"
           
        xmlns:telerikNav="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
        xmlns:telerikControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:telerikPrimitives ="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
        xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input">

        <Grid x:Name="LayoutRoot" Background="White">
            <reportViewer:ReportViewer x:Name="xReportViewer"
                                       ReportServiceUri="http://127.0.0.1:81/Service/ReportService.svc"
                                       Report="ReportLibrary.AllPatients, ReportLibrary,  Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
            </reportViewer:ReportViewer>
        </Grid>
    </UserControl>

    The configuration for the service looks like this on the server side.

            <behavior name="ReportServiceBehavior">
              <dataContractSerializer maxItemsInObjectGraph="10000000"/>
              <serviceMetadata httpGetEnabled="true"/>
              <serviceDebug includeExceptionDetailInFaults="false"/>
              <useRequestHeadersForMetadataAddress>
                <defaultPorts>
                  <add scheme="http" port="81"/>
                  <add scheme="https" port="444"/>
                </defaultPorts>
              </useRequestHeadersForMetadataAddress>
            </behavior>
    ...
          <endpointBehaviors>
            <behavior name="WebBehavior">
              <webHttp/>
            </behavior>
          </endpointBehaviors>
    ...
          <service name="Telerik.Reporting.Service.ReportService" behaviorConfiguration="ReportServiceBehavior">
            <endpoint address="" binding="basicHttpBinding" contract="Telerik.Reporting.Service.IReportService">
              <identity>
                <dns value="localhost"/>
              </identity>
            </endpoint>
            <endpoint address="resources" binding="webHttpBinding" behaviorConfiguration="WebBehavior" contract="Telerik.Reporting.Service.IResourceService"/>
            <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
          </service>

    I know the Report works because I created an aspx page and I was able to see it using the Web Report Viewer, but not through WCF.

    On the Reporting documentation ( http://www.telerik.com/help/reporting/silverlight-hosting-in-iis.html ) on how to Host a WCF Service for reports, I don't understand how Service class (ReportService.svc) knows what library the reports are.  Just by adding a reference to the library containing the reports, is that all I need to do?

    I would appreciate all the help I can get.
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 26 Feb 2010 Link to this post

    Hi Deylo Woo,

    The "NotFound" error usually indicates an invalid service url. If it is working on your local machine, make sure that the WCF service is hosted properly in IIS and you have deployed it correctly - see this thread. and verify that the ReportViewer.ReportServiceUri points to the correct location of the Telerik Reporting WCF Service. The easiest way to get started is to review carefully the Telerik Reporting Getting Started with the Silverlight Report Viewer video and use the provided Visual Studio Silverlight example solution as base.

    Kind regards,
    Steve
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Deylo Woo
    Deylo Woo avatar
    2 posts
    Member since:
    Aug 2012

    Posted 26 Feb 2010 Link to this post

    I suspected it was a WCF error.  The report service does not work on my local machine nor on Azure Cloud, however I have several other WCF services running well locally and when published to the cloud.  I better open a trouble ticket.  This is crucial to our app.

    Thanks.
  5. Steve Johnson
    Steve Johnson avatar
    24 posts
    Member since:
    Feb 2010

    Posted 10 Jun 2010 Link to this post

    Any luck getting the service to run from https?
Back to Top