Hello,
I am currently evaluating your reporting product... I am attempting to connect to an EF 4.1 Object Context... I created a partial class with a new method that returns a list of a customized class for the report like so:
namespace Telerik.Reporting.Examples.CSharp { public partial class WOCatalogEntities1 { public List<ReportData> GetWorkOrdersForReport() { this.ContextOptions.LazyLoadingEnabled = true; var list = this.WorkOrderHeaders.Where(e => e.WOStatusType.is_open_status).Select(e => new ReportData { WONumber = e.wo_no, LastEdited = e.server_updt, Status = e.WOStatusType.status_desc, Task = e.task, Tech = e.WOPersonnel.lname, VendorNumber = e.pp_vendorcode, WOType = e.WOTaskType.TaskType, WOUnit = e.WORentalUnit.unit }); return list.Take(50).ToList();; } } public class ReportData { public int WONumber { get; set; } public string WOUnit { get; set; } public string Tech { get; set; } public string Status { get; set; } public string VendorNumber { get; set; } public string Task { get; set; } public string WOType { get; set; } public DateTime? LastEdited { get; set; } } }
the partial class is in the same assembly AND the same namespace as the Entity Model of the same name... but I get the error that telerik cannot find the method ???
Telerik.Reporting.Processing.Data.ObjectDataSourceException: Method GetWorkOrdersForReport() not found.
at Telerik.Reporting.Processing.Data.ObjectQueryProvider.GetSelectMethod(Type type, String name, IDictionary`2 parameters)
at Telerik.Reporting.Processing.Data.ObjectQueryProvider.ResolveDataSourcePropertiesFromType()
at Telerik.Reporting.Processing.Data.ObjectQueryProvider.ResolveDataSourceProperties()
at Telerik.Reporting.Processing.Data.ObjectSchema.FillSchema(ObjectQueryProvider queryProvider)
at Telerik.Reporting.Processing.Data.ObjectSchema..ctor(ObjectQueryProvider queryProvider)
at Telerik.Reporting.Processing.Data.ObjectQueryProvider.CreateSchema()
at Telerik.Reporting.Processing.Data.MultidimensionalQueryProvider.GetSchema()
at Telerik.Reporting.Design.DataSourceService.GetCurrentDataSourceSchema(Boolean throwOnError)
at Telerik.Reporting.Design.DataExplorerControl.RefreshDataSource()
Thanks
Greg