This is a migrated thread and some comments may be shown as answers.

WCF Report Service to Silverlight Report Viewer Error.

3 Answers 313 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Deylo Woo
Top achievements
Rank 1
Deylo Woo asked on 24 Feb 2010, 07:06 PM
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.

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 26 Feb 2010, 04:50 PM
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.
0
Deylo Woo
Top achievements
Rank 1
answered on 26 Feb 2010, 06:08 PM
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.
0
Steve Johnson
Top achievements
Rank 1
answered on 10 Jun 2010, 08:25 AM
Any luck getting the service to run from https?
Tags
General Discussions
Asked by
Deylo Woo
Top achievements
Rank 1
Answers by
Steve
Telerik team
Deylo Woo
Top achievements
Rank 1
Steve Johnson
Top achievements
Rank 1
Share this question
or