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

"Method XYZ not found" in Table Wizard - using ObjectDataSource with a WCF service extension method

4 Answers 111 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 23 Aug 2011, 05:21 PM
Hi,

I'm building a report where the data is coming from a WCF Data Service.

I've therefore taken the approach outlined in this thread - http://www.telerik.com/community/forums/reporting/telerik-reporting/getting-data-from-web-service.aspx

In my report class I've added reference to the WCF Service and then implemented an extension - giving me a method that gets the data from the actual WCF service and returns an enumerable of the datatype I need to put into a table in the report.  My new method is called "GetInvoicesDueThisMonth"

I've then added an ObjectDataSource from the toolbox and set it up in exactly the same way as the thread above - with the DataSource being the WCF service client class and the DataMember being the new extension method I implemented.

Next I set the DataSource of the Report to be the ObjectDataSource I added from the toolbox.

Finally I clicked on the Table Wizard from the toolbox and when I select my ObjectDataSource from the "Current Data Sources" - it throws back an error "Method GetInvoicesDueThisMonth() Not found."

I've attached two screenshots - the first showing the method implemented in the service extension and the second showing the error I'm getting...  I've obviously had to blackout parts that I can't show.

Any idea how to resolve this and what I could be doing wrong?

4 Answers, 1 is accepted

Sort by
0
Chris
Top achievements
Rank 1
answered on 24 Aug 2011, 08:39 AM
I've just realised that exactly the same problem happens in the sample code I've downloaded from the link I previously mentioned.... see the attached screenshot.

How do I resolve this?

0
Chris
Top achievements
Rank 1
answered on 24 Aug 2011, 09:14 AM
Is this related to the following comment in this article? - http://blogs.telerik.com/telerikreportingteam/posts/10-10-22/using-telerik-reporting-with-wcf-ria-services.aspx

"Note: Currently the Report Designer can't get the schema of the data source because of WCF RIA services' peculiarities. Thus be aware that the available wizards and Data Explorer would not be populated with data source fields and both Previews would not work."

If so, would you care to explain how we get around this and how the example code was therefore actually built?
0
Peter
Telerik team
answered on 26 Aug 2011, 02:08 PM
Hello Chris,

In order to have design time support our suggestion is to use a dummy datasource (objects) that replicate the WCF service schema.

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 >>

0
Chris
Top achievements
Rank 1
answered on 12 Sep 2011, 10:45 AM
Hi, thought I should update on this... because I didn't really need actual 'design time' support, instead of using a dummy datasource I just added a blank table onto the report (not using the wizard).

Then, once I'd setup my datasource to be the ObjectDataSource, I just typed straight into the table cell.. for example if I knew the return type of service extension method had an attribute 'ABC' and I wanted that in the first column of the table, I typed "=Fields.ABC" into the table cell.  This then appears as [=Fields.ABC] and when run works perfectly.
Tags
General Discussions
Asked by
Chris
Top achievements
Rank 1
Answers by
Chris
Top achievements
Rank 1
Peter
Telerik team
Share this question
or