I have inherited a database where all data is retrieved using Select stored procedures. These have been mapped to functions in a linq to sql model, but when linking up to a Report I don't get any data back.
I tried to follow the example given in this thread, using an objectdatasource but it still will not work:
http://www.telerik.com/community/forums/reporting/telerik-reporting/linq-in-an-object-data-source.aspx
The code in my business logic class is:
I tried to follow the example given in this thread, using an objectdatasource but it still will not work:
http://www.telerik.com/community/forums/reporting/telerik-reporting/linq-in-an-object-data-source.aspx
The code in my business logic class is:
public
class
BLL
{
public
static
IEnumerable<spGetPackages> GetPackages()
{
TardisDataContext context =
new
TardisDataContext();
ISingleResult<spGetPackagesResult> result = context.spGetPackages();
List<spGetPackagesResult> returnlist = result.ToList();
return
returnlist;
}
}
In my Report.Designer.cs class I have the following:
//
// objectDataSource1
//
this
.objectDataSource1.DataMember =
"GetPackages"
;
this
.objectDataSource1.DataSource =
typeof
(BLL);
this
.objectDataSource1.Name =
"objectDataSource1"
;
I know the function is working fine as I can retrieve data through a GridView. I think I read a comment somewhere that this method might not work with stored procedures? Where am I going wrong?