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 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.
Thanks,
Andres
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();
Hi Regina,
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,
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.