or
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?
this.chart3.BitmapResolution = 96F;this.chart3.ChartTitle.Appearance.Visible = false;this.chart3.ChartTitle.Visible = false;this.chart3.DataSource = this.sqlDataSource1;this.chart3.DefaultType = Telerik.Reporting.Charting.ChartSeriesType.Pie;this.chart3.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf;this.chart3.IntelligentLabelsEnabled = true;this.chart3.Legend.Appearance.Border.Visible = false;this.chart3.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.1000000610947609D), Telerik.Reporting.Drawing.Unit.Inch(0.20000012218952179D));this.chart3.Name = "chart3";this.chart3.PlotArea.XAxis.MinValue = 1D;chartSeries1.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.ChartSeriesLegendDisplayMode.ItemLabels;chartSeries1.DataLabelsColumn = "ProductName";chartSeries1.DataYColumn = "Quantity";chartSeries1.Name = "Series 1";chartSeries1.Type = Telerik.Reporting.Charting.ChartSeriesType.Pie;this.chart3.Series.AddRange(new Telerik.Reporting.Charting.ChartSeries[] {chartSeries1});this.chart3.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(5.0000004768371582D), Telerik.Reporting.Drawing.Unit.Inch(2.8999998569488525D));