I am trying to perform client side processing for a report, connecting to the domain service located on the web server. I am using the domain services for other silverlight application functions and it is working perfectly. When I try to use the same domain services for the report I created, the wizard does not locate or identify any domain services on my webserver (except for some default user registration services also located on the server).
This tells me that it is finding my webserver, just not locating the domain services I had created.
Please let me know if I ma doing something wrong.
Hi,
I will need a bit more info in order to figure out what may be happening.
How is the structure of your solution? Did you create your report directly under the Silverlight application?
Thanks,
Leo
PD: Just in case you didn't see it, in the documentation shipped with the CTP there is a walkthrough that explains how to create a report that connects to RIA Services (the section is called "Working With RIA Services in Silverlight")
Thanks for responding.
I created the report in the Silverlight application. My DomainServices are located in my RIA services web project from which I obtain data for my silverlight application. When loading the report, it does not recognize that there are any Domain services on my server.
It is quite frustrating because when stepping through the (quite impressively detailed) walkthrough provided, it still gives me the same issue. One thing I noticed though was that when stepping through the walkthrough on the example code provided with the reporting download, I got it to recognize a custom domain service. That was however on the example code and not in my project.
I then decided to import the example reporting class project into my solution, reference it, create a domainservice in my webserver, compiled and still it did not identify any of the domain services on the webserver :)
I can connect to the domain services from my silverlight application, however the documentation says that is not the right way to do it.
The reason I want to use it with client side processing is because I already have the infrastructure set up for RIA services and I my domain services dynamically switch to different databases on instanstantiation. I also want the client to take the load (note that in an attempt to just get it to work I am using stock standard domain services, connected to the standard northwind database).
My alternative is to give up trying to get it to work with Ria services and put it on the server. If I have to do that then I have to work out how to switch database connection strings.
Hopefully you can help me.
Jody
Hi
I created a new Azure RIA services SIlverlight business application to send to you as an example. After I completed creating it (using the already included ASPNETDB.MDF database that is generated for the porject, it still did not work.
I realized that you can just create the project yourself to repeat my issue. If you would like though - I will send you the project I created.
Here is a screenshot of teh standard project illustrating that the domainservice1 class (after comilation) is not accessibly by the report.
Hi Jody,
If you can send us the project, it will speed up the process for us to reproduce it. Given that we can make it work following the steps in the walkthrough, I suspect there's something else going on.
Anyway, we'll try to reproduce it for the exact scenario you have (Azure, VB), which is not the one in the walkthrough.
Andres
Hi Andres,
I am having exactly the same issue. I followed the instructions in the CTP user guide, just like Jody, and in the report I cannot see the entity classes exposed by the domain service. Please let me know how to send you my project, as the compressed version of it is still slightly too big for your 200K upload limit.
Thanks, Regina
Hi Regina,
Could you send it to my personal email address? aaguiar at infragistics.com.
The datatype you get in the SL project should be something like <Namespace>.<DomainServiceName>, and there there should be a property for each entity in the model.
The stored procedure needs to be mapped to an entity so it can be used from RIA Services.
Here is an example:
http://blogs.msdn.com/b/brada/archive/2009/08/24/business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update-part-24-stored-procedures.aspx
The file in ReportingSLApp\Generated_Code\ReportingSLApp.Web.g.cs which is the RIA Services proxy for the SL app, and which has the type that is used by the Object Data Source wizard, does not contain that method, so the wizard can’t find it.
I hope that helps,
Hi Mark,
We'll work on it and include it in the examples that ship with the product. As soon as we have it we'll let you know.
Would a step-by-step and small example project be possible? I'm having similar difficulties in getting SProcs to work.
Thanks,Mark
Thanks Andres, it took me a while to get it right but in essence what I had to do was to create a separate entity class that maps the complex return type of the stored procedure one to one.
The entity class was then exposed by the domain service and available for using as data source for the report. It is important to note that the entity class must have a [Key] attribute, o/w the SL application containing the report will not compile.
I am listing my entity class and the domain service method fo calling the stored procedure for reference.
Thanks again for your help.
Regina
namespace ReportingSLApp.Web
{
public class ActivitiesList
public string Type { get; set; }
..
public string Assigned_To { get; set; }
[Key]
public System.DateTime Added { get; set; }
...
public string Status { get; set; }
}
public IQueryable<ActivitiesList> GetActivitiesList()
var query = from rpal in this.DataContext.ReportProc_ActivitiesList(0, 0, "", "", null, null, null, null)
select new ActivitiesList
Added = rpal.Added,
Assigned_To = rpal.Assigned_To,
Status = rpal.Status,
Type = rpal.Type,
};
return query.AsQueryable();