public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { RMonthRpt rpt = new RMonthRpt(); rpt.Site = this.Site; return(rpt); }
private void GetReport() { if (Request.QueryString["Month"] != null && Request.QueryString["Year"] != null) { int month = Convert.ToInt32(Request.QueryString["Month"]); string mnth = DateTimeFormatInfo.CurrentInfo.GetMonthName(month); RMonthRpt objRpt = new RMonthRpt(); crystalReport = objRpt; a.ExcecuteQuery("select Bill_no,Return_date,sum(0+P_sold) as price,Sum(0+P_tot) as total,Sum(0+P_tot)-sum(0+P_sold) as tax from SalesRTable where Month(Return_date)='" + Request.QueryString["Month"] + "' and Year(Return_date)='" + Request.QueryString["Year"] + "' group by Bill_no,Return_date "); crystalReport.SetDataSource(a.DT); crystalReport.SetParameterValue("month", mnth); crystalReport.SetParameterValue("year", Request.QueryString["Year"].ToString()); CrystalReportViewer1.ReportSource = crystalReport; } }