Telerik Reporting with WCF Ria Services

6 posts, 0 answers
  1. Brett Rose
    Brett Rose avatar
    4 posts
    Member since:
    Apr 2010

    Posted 06 Apr 2010 Link to this post

    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
  2. Ahmed Saeed
    Ahmed Saeed avatar
    2 posts
    Member since:
    Dec 2009

    Posted 08 Apr 2010 Link to this post

    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 .

  3. DevCraft banner
  4. Robert
    Robert avatar
    23 posts
    Member since:
    Feb 2009

    Posted 20 Apr 2010 Link to this post

    I too am interesting in using RIA Services + Silverlight + Telerik Reporting.

    Examples would be appreciated, especially ones that include security.
  5. Pierre
    Pierre avatar
    212 posts
    Member since:
    Apr 2007

    Posted 19 May 2010 Link to this post

    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?
  6. Pierre
    Pierre avatar
    212 posts
    Member since:
    Apr 2007

    Posted 19 May 2010 Link to this post

    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?
  7. Ahmed Saeed
    Ahmed Saeed avatar
    2 posts
    Member since:
    Dec 2009

    Posted 20 May 2010 Link to this post

    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.
Back to Top
DevCraft banner