or
<telerik:ReportViewer Name="telerikPersonReport" Height="275" />public void LoadTelericReport(){ Telerik.Reporting.EntityDataSource entityDataSource = new Telerik.Reporting.EntityDataSource(); ReportEntity objectContext = new ReportEntity(); entityDataSource.ObjectContext = objectContext; entityDataSource.ObjectContextMember = "Events"; Telerik.Reporting.Report report = new Telerik.Reporting.Report(); report.DataSource = entityDataSource; Telerik.Reporting.InstanceReportSource reportSource = new Telerik.Reporting.InstanceReportSource(); reportSource.ReportDocument = report; telerikPersonReport.ReportSource = reportSource; telerikPersonReport.RefreshReport();}public class ReportEntity { Attendance_Tracker ThisData = new Attendance_Tracker(); public ReportEntity() { ThisData.Attendances.Load(); ThisData.Attendees.Load(); ThisData.Events.Load(); ThisData.Sessions.Load(); } public List<EventType> Events() { var AllEvents = from e in ThisData.Events.Local select new EventType() { EventID = e.EventID, EventName = e.EventName, StartDate = e.StartDate, EndDate = e.EndDate, count = (from a in ThisData.Attendances.Local where a.Session.Event == e select a).Count() }; return AllEvents.ToList(); }}Good morning,
I have successfully been able to add a built report to a Windows Form, but I am having a little trouble getting it to work on a webpage.
I have added the Telerik Report to the webpage, added the Report Source, but I am getting the error
"The source of the report definition has not been specified."
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource(); instanceReportSource.ReportDocument = new Telerik.Reporting.Examples.CSharp.ListBoundReport(); this.ReportViewer1.ReportSource = instanceReportSource; } }textbox1.Visible = false;(this.Items.Find("textbox1", true)[0] as Telerik.Reporting.ReportItem).Visible = true;