Using Telerik Report WCF Service (or how to display reports in RadBook)

Wednesday, December 02, 2009 by Reporting Team | Comments 6

If you are following the Telerik Reporting product closely you may already know that with the 2009 Q3 release we entered the Silverlight game. The industry's first native Silverlight Report Viewer allows you to display Telerik Reports in your Silverlight application while having all goodies that the Windows Forms and Web viewers offer. The new member of the report viewers' family sports report parameters, the new document map, true printing and export to all available formats, including PDF, Image (TIFF, PNG, JPEG, BMP, GIF), Microsoft Excel (XLS), Rich Text Format (RTF), HTML, CSV and the new XPS. And all this power wouldn't be available without the reporting engine we already have and use in the other two technologies (Windows Forms and ASP.NET).

 

The Telerik Reporting Service is a WCF service that enables remote access to the Telerik Reporting Engine. The Reporting Service acts as a communication interface between the client programs and the report server. Thanks to it the Silverlight viewer can utilize the full capabilities of the reporting engine making no compromise with the different platform. Besides the report generation/rendering the the Telerik Report WCF service provides additional operations dedicated to the needs of the Silverlight report viewer.

 

This blog post illustrates how to create a custom report viewer application that utilizes some of the key Report Service operations. It uses the new RadBook Silverlight control to host the report pages. If you are not familiar with the new control in Telerik RadControls for Silverlight, check the First Look at RadBook for Silverlight blog for more insight.

 

Below is a Live Demo to help you experience this first hand - just point your mouse to a page corner and turn the page!

Open demo in new window.

The complete source code is available here. Please note that the provided implementation is for demo purposes only.

6 Comments

  • Ben Hayat 03 Dec
    Guys, you rock...! I had recently put this request on the report forum and discussed it with Kiril, and here we are, an amazing clean looking report in Silverlight and also in RADBook. Congrats to both team!

    A few questions:
    a) Does the report processor have some sort of Caching system, that if more than one client is hitting the same report, the processor will not regenerate for every request? This  is a dangerous wish to ask for, because the report processor, doesn't know if the data between client's requests have changed or not. But, let's assume, we are generating a report that is based on none-changing data, could we have a faster delivery for any subsequent clients?

    b) Let's say on page 9 of the report, the bike "Road-650", had more items that would fit on page 9, where would the rest go?

    c) Since this report is being watched on screen, would be possible at design time of the report, to place a nice background image or create gradient color scheme for the background, that would get repeated for each page?

    d) How is the WCF report service delivering the pages to the client? One at a time or all the XAML are sent as one large stream? The reason I ask, raises two questions: a) Before the reports begins, is there anyway I can ask the report generator how many pages are the total? b) Can I give user the ability to "Jump" to next or last or first page?

    e) Is this solution, "always" going to be Read-only? or would it be possible to have interactive controls? But that raises the question, where do you write code to respond with interaction events.

    These answers, will help me make a decision in what cases to add or mix the report along using Items Template.

    This demo is very nice and more that I was expecting for the first demo.
    Thank you guys!
    ..Ben
  • Vassil Petev 03 Dec
    @ Ben: This post only shows the capabilities of our tools and how they can interact with each other, i.e. it is a showcase. If you think you can use it in the real-world, feel free to download the demo code and play with it - we are sure it will answer all of your questions. Work your MVP magic on it and send us your feedback!
  • Ben Hayat 03 Dec
    After looking at the source of Page1 XAML, I see the "PageContent" is being displayed in Left and right Template, along side with Page number that is done on the SL client side. So I guess the answer to (c) question is Yes, I can design the background right in SL client.

    ..Ben
  • Ben Hayat 03 Dec
    @Vassil: You're absolutely right and I was in no shape or form questioning the tool's ability. I'm super excited with the results. Those were some quick questions as I saw the demo. I'm sure by time you'll see great use of this combo!

    ..Ben
  • --Kdc 03 Dec
    Looks fantastic!
  • dhninh 30 Mar
    dhninh: If I want edit data into this book and update to database, i must do what, how?

Add comment

  1. Formatting options
       
     
     
     
     
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)