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

Sample/Tutorial for Consuming WCF Service

3 Answers 205 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jen
Top achievements
Rank 1
Jen asked on 24 Aug 2011, 07:26 AM
A sample for consuming the WCF service in a non-Silverlight web app would be very useful.  The documentation for the Telerik.Reporting.Service namespace is pretty sparse.  An example showing how to render a report using either the IResourceService export method or the IReportService render method in an ASP.NET app that does not use Silverlight would be very helpful.  For example, can I use a RenderingResult in a report viewer?  If not, how do I get a report back through the web service and display it in a page in another web app?

Thanks,
Jen

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 26 Aug 2011, 04:27 PM
Hello Jen,

Currently the Telerik Reporting WCF service can be consumed exclusively by the Silverlight report viewer.  All other viewers use the full .NET framework and don't need the report service to utilize Telerik Reporting engine. Still we do plan to enable all report viewers to use the Telerik Reporting service. In the meantime you can utilize the report service in a non Silverlight project as a normal WCF service, to export reports. Just add a Service/Web Reference to the project. Once the service reference is added you can create ReportService instance as shown in the following code snippet:

private void button1_Click(object sender, System.EventArgs e)
{
    var service = new MyReportServiceReference.ReportService();
     
    var result = service.Render("PDF",
           "TelerikReportingServiceHostApp.Report1, TelerikReportingServiceHostApp",
            null,
            null);
 
    var fs = new FileStream("c:\\report1.pdf", FileMode.Create);
    fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
    fs.Flush();
    fs.Close();
}

Thank you for the suggestion. We will consider to elaborate further on scenarios involving Telerik Reporting WCF service in our documentation. Best wishes,
Peter
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Jen
Top achievements
Rank 1
answered on 26 Aug 2011, 05:21 PM
Thanks.  I was hoping to be able to actually display the report retrieved via the service (would like to be able to deploy new reports without deploying a new dll) in a non-silverlight viewer rather than making the user save it.  You mentioned that this might be possible in the future.  Any idea when this might be released?
Thanks,
Jen
0
Peter
Telerik team
answered on 31 Aug 2011, 05:44 PM
Hi Jen,

We haven't started yet to work on non-Silverlight viewers compatibility with Telerik Reporting WCF service. Additionally we are currently busy with other important tasks. Thus currently I can't engage with a specific time frame. Still we do understand the importance of this feature and once we start working on it we will update our RoadMap.

Kind regards,
Peter
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
General Discussions
Asked by
Jen
Top achievements
Rank 1
Answers by
Peter
Telerik team
Jen
Top achievements
Rank 1
Share this question
or