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

Telerik Reporting with WCF Ria Services

5 Answers 298 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Brett Rose
Top achievements
Rank 1
Brett Rose asked on 06 Apr 2010, 06:29 PM
Hello,

I was looking through your documentation and videos and I couldn't find any examples of using the Telerik Reporting with WCF Ria Services. I was wondering if anyone is able to provide me with an example/starting point so I can work Telerik reporting into my current WCF Ria Services Silverlight Application.

Thanks,

Brett

5 Answers, 1 is accepted

Sort by
0
Ahmed Saeed
Top achievements
Rank 1
answered on 08 Apr 2010, 11:28 AM
Hi Brett & Telerik team,
              I am working on an app with silverlight front end and WCF RIA Domain Services, NHibernate at the back end. I am using the ServiceContext to store my Identity (logged in user / site).  I am using Telerik reporting specifically for its SilverlightReportViewer, the only place where i can access things like OperationContext or ServiceContext is in my reports library since there is no server code except an svc file named ReportService.svc that reads the reports from my library, but it appears that ServiceContext is not available hence 

  1.           I am forced to use CallContext to store my  NHibernate session, i need it to provide data to my report.
  2.   I am unable to find a place where i can retrieve/store my Identity


Wouldn't it be simple and easy if we had a ServiceContext available  ?  Do i need to do some extensions for this ? The most disturbing thing is to store the NHibernate session in CallContext, i mean i am working on a web app not a desktop one.

For a workaround i will add my identity in service header before report service call and access it on the server side.

Any help is appreciated regarding identification of WCF part in Telerik Reporting .

0
Robert
Top achievements
Rank 1
answered on 20 Apr 2010, 07:46 PM
I too am interesting in using RIA Services + Silverlight + Telerik Reporting.

Examples would be appreciated, especially ones that include security.
0
Pierre
Top achievements
Rank 2
Iron
answered on 19 May 2010, 08:39 PM
Any developpement here?

How I can use telerik reporting with the RIA service that I aleready use for my silverlight 4 application? Do I need to add another "service" like the telerik reporting service to acheive this? Do you have some working demo with these configuration?
0
Pierre
Top achievements
Rank 2
Iron
answered on 19 May 2010, 08:39 PM
Any developpement here?

How I can use telerik reporting with the RIA service that I aleready use for my silverlight 4 application? Do I need to add another "service" like the telerik reporting service to acheive this? Do you have some working demo with these configuration?
0
Ahmed Saeed
Top achievements
Rank 1
answered on 20 May 2010, 07:23 AM
Hi Pierre and everyone ,i just got time after we shipped the release to the client , i thought i should share some bits of my implementation. I had to use callcontext to store my NHibernate session on the server side. For storing user identity i implemented a custombinding with a messageInspector on the client side  that adds a header (containing user identity) before sending request to the ReportService.svc WCF service.


//Client - implement IReportServiceClientFactory on the usercontrol hosting the reportviewer
public partial class ReportView : UserControl, IReportServiceClientFactory  
{
//Constructor 
public ReportView()
        {
            InitializeComponent();
            FacesheetReportViewer.ReportServiceClientFactory = this;
}

//Create method for ReportServiceClient
public ReportServiceClient Create(Uri remoteAddress)
        {

            var binding = new BasicHttpMessageInspectorBinding(new MyCustomMessageInspector());
            var address = new EndpointAddress(ReportViewer.EnsureAbsoluteUri(remoteAddress));
            var client = new ReportServiceClient(binding,address);
                        
            return client;
        }

}

In the reports library on the server side , only place i could find to get the identity header was in the constructor of my report component. I was able to access OperationContext here like:

string identity = OperationContext.Current.IncomingMessageHeaders.GetHeader<string>("IdentityHeader", "");

@Pierre . I am afraid you will have to add the wcf service as mentioned in the documentation. Telerik reporting does not have out of the box support for RIA.
Tags
General Discussions
Asked by
Brett Rose
Top achievements
Rank 1
Answers by
Ahmed Saeed
Top achievements
Rank 1
Robert
Top achievements
Rank 1
Pierre
Top achievements
Rank 2
Iron
Share this question
or