public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ReportDaily rpt = new ReportDaily(); rpt.Site = this.Site; return(rpt); }
private void button1_Click(object sender, EventArgs e) { var d = dateTimePicker1.Value; CultureInfo cul = CultureInfo.CurrentCulture; int weekNum = cul.Calendar.GetWeekOfYear( d, CalendarWeekRule.FirstDay, DayOfWeek.Monday); int dateNum = cul.Calendar.GetDayOfYear(d); Console.WriteLine(dateNum); ReportDaily rd = new ReportDaily(); rd.SetParameterValue("startDateIndex", dateNum.ToString()); crystalReportViewer1.ReportSource = rd; crystalReportViewer1.Refresh(); crystalReportViewer1.Show(); Console.WriteLine("refreshed"); }
private void crystalReportViewer1_Load(object sender, EventArgs e) { ReportDaily rd = new ReportDaily(); rd.SetParameterValue("startDateIndex", "2"); }