public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { DateRpt rpt = new DateRpt(); rpt.Site = this.Site; return(rpt); }
private void GetReport() { if (Request.QueryString["Date"] != null) { DateRpt objRpt = new DateRpt(); crystalReport = objRpt; a.ExcecuteQuery("select Bill_no,Sales_date,sum(0+P_qty*P_price) as price,Sum(0+P_tot) as total,Sum(0+P_tot)-sum(0+P_qty*P_price) as tax from SalesTable t1 inner join ProductTable t2 on t1.P_name=t2.P_name where Sales_date='" + Convert.ToDateTime(Request.QueryString["Date"]).Date.ToString("yyyy-MM-dd") + "' group by Bill_no,Sales_date "); crystalReport.SetDataSource(a.DT); crystalReport.SetParameterValue("date", Request.QueryString["Date"].ToString()); CrystalReportViewer1.ReportSource = crystalReport; } }