public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { DailyUsageRate rpt = new DailyUsageRate(); rpt.Site = this.Site; return(rpt); }
private void buttonWeeklyUsage_Click(object sender, EventArgs e) { SA46Team09BEntities context = new SA46Team09BEntities(); DateTime mydate = DateTime.Now.Date; DailyUsageRate CR = new DailyUsageRate(); var Query = from x in context.Transactions where x.CancelRef == 0 && x.BookingDateTime >= mydate select x; List <Transaction> Translist = Query.ToList <Transaction>(); CR.Database.Tables[0].SetDataSource(context.FacilityInformations); CR.Database.Tables[1].SetDataSource(Translist); crystalReportViewerReport.ReportSource = CR; ((MAIN)MdiParent).UpdateStatusLabel("Report Generated"); }