I have a C# project with a class with this method:
data is two columns with a bunch of numbers.
Then I have a web application with a webform and a report viewer. I want a report that utilizes that data variable. How would I accomplish this?
5 Answers, 1 is accepted
First you have to set up your report definition. For this check out the Report Structure help articles. You have to databind your report definition as elaborate in the Using Telerik Reporting with WCF RIA Services help article. Finally you can set your report definition to the ReportViewer.ReportSource as illustrated in the How to: Add report viewer to a web page help article.Regards,
So in the code I pasted, I want to be able to bind a table or graph to the "data" variable. In the second link you pasted, I'm not sure if the fact I'm not using a Silverlight application will cause an issue - I'm trying to embed the report in an aspx page.
In that link, when he says "Add a partial class to extend the domain service soap client with a method that returns RootResults that are acceptable for the ObjectDataSource:" I'm not sure what the domain service soap client is.
"domain service soap client" refers to the client serving the AdventureWorksDomainService1 in the linked to the blog post example.
In your case, you have a service reference to consume your service (Service1) in a console application. If you create a report definition in that application and add an ObjectDataSource component, it can use the ServiceReference.ServiceClient as data object, and then its GetGraphData method as data member.
Basically the idea of this data source is to allow the usage of any custom data retrieval you need.
I hope this helps.
As stated in the blog article mentioned by my colleague:
"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."
This is because the Visual Studio Report Designer operates inside the Visual Studio application. When previewing a report the report constructor is executed in the context of the Visual Studio application. In this case the configuration file is is devenv.exe.config. Thus if you want to have a preview you have to add the service endpoints in the devenv.exe.config (for VS2010 on 32 bit machine it is located in C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config. For 64 bit Windows you should look in the C:\Program Files (x86)
\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config)
Generally to debug your data access layer while you are using the VS designer you have to open another Visual Studio instance, select Debug->Attach to process to debug another instance of devenv.exe and select Debug->Exception... to enable the First Chance Exceptions
Let us know if you have any further questions.