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

Creating silverlight report with WCF

7 Answers 110 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chandan Dey
Top achievements
Rank 1
Chandan Dey asked on 29 Apr 2013, 04:14 PM
Hi,
I am using telerik trial version an try to create a test report. I spend 3 days to do this but did not success.

My scenario is like:
1) I have a WCF Project called "ReportWCF" which is use to connect mysql database and collect data and return in generic list method say "lstGetOrder".

2) I have another project "ReportLibrary" which contain "OrderReport1.cs" and "OrderList.cs" which is use to hold data returned from WCF call back.

Till now everything is fine.
But before my WCF execution is finished my report viewer is appeared in my Silverlight application. I think but not sure it is for Async call because if I put a break point on the "OrderList.cs" after a while the break point will hit but the blank report already rendered in Silverlight?

I use objectdatasource hear.

**************************************************************

How can I do this to overcome this problem.
I was already tried the "ReportServiceClient" implementation in Silverlight page but there is an error called:
Could not find default endpoint element that references contract 'Telerik.Reporting.Service.SilverlightClient.IReportService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

Use like Report.xaml.cs:
ReportServiceClient IReportServiceClientFactory.Create(System.Uri remoteAddress)
        {
            var binding = new BasicHttpBinding() // or BasicHttpBinding(BasicHttpSecurityMode.Transport) overload if SSL is used
            {
                MaxBufferSize = int.MaxValue,
                MaxReceivedMessageSize = int.MaxValue,
                ReceiveTimeout = new TimeSpan(0, 15, 0),
                SendTimeout = new TimeSpan(0, 15, 0)
            };

            var endpointAddress = new EndpointAddress(remoteAddress);

            return new ReportServiceClient(binding, endpointAddress);
        }

private void LayoutRoot_Loaded(object sender, RoutedEventArgs e)
{
          ReportServiceClient client = new ReportServiceClient();
}

In this case how to fix the error and how to call WCF method?
and how can I call my wcf method with this "client" proxy object. My WCF method is CreateReport();
I want to use like client.CreateReportCompleted += .........  ;  client.CreateReportAsync();

Can you please send me a sample application to do get data from WCF call back and populate report?

I have see all the sample but unable to understand.
like : http://www.telerik.com/help/reporting/silverlight-report-viewer.html
http://www.telerik.com/help/reporting/silverlight-wcf-service-overview.html
etc.
Please send me solution asap.
Thanks in advance
Chandan

7 Answers, 1 is accepted

Sort by
0
Chandan Dey
Top achievements
Rank 1
answered on 30 Apr 2013, 10:54 AM
Can anyone find any solution to do this. Its very urgent.
0
Squall
Top achievements
Rank 1
answered on 30 Apr 2013, 12:00 PM
You can check the silverlight demo that came with the installation. They have a report that you can view in the Silverlight viewer and uses objectdatasource.

SN
0
Chandan Dey
Top achievements
Rank 1
answered on 01 May 2013, 03:53 PM
Hi Squall,
Thanks for your reply.

The previous part was solved. Now I able to create report with some static parameter value.
Now I want to create report with parameter value.

I have a Business Object called "Products" list which is bind in my Report say "Report1.cs".

Now I want to populate "Products" object with parameters supplied from Silverlight page like show data in between data and time range range and selected department. Is it possible?

Or can I populate "Product" object from WCF service like add Business object dll refer to wcf project and populate "Product" object?

I will send you some my screen short for reference.

I see the Self-Hosted Telerik Reporting WCF Service but not much clear about it. Can you please give me a small application with one method for report data and create report and show.

Thanks
Chandan
0
Chandan Dey
Top achievements
Rank 1
answered on 03 May 2013, 09:06 AM
Hi,

Is there any solution of my scenario? Is it doable or not. Please let me know. Its quite urgent for me.

Thanks
0
Peter
Telerik team
answered on 03 May 2013, 02:04 PM
Hello Chandan,

How to pass report parameter values to the reporting engine from Silverlight is elaborated in the Programmatic Initialization of Report Parameter Values in Telerik Reporting Silverlight Viewer blog post. About utilizing services for datasource check out the Using Telerik Reporting with WCF RIA Services blog post.

Additionally you may find useful the following help articles:

Regards,
Peter
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
Chandan Dey
Top achievements
Rank 1
answered on 03 May 2013, 02:20 PM
Hi,

Thanks for your reply.
Not much clear to me with the supplied link.
Can you please a small demo application.

send parameter ( start date and end date) from silverlight app to call WCF service method. Method will returned list<product> from which I create report business object and with that business object bind in report.

Thanks again
Chandan
0
Peter
Telerik team
answered on 08 May 2013, 12:15 PM
Hi Chandan,

Check out the attached updated sample.

Kind regards,
Peter
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

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