Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            MonthRpt rpt = new MonthRpt();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemplo n.º 2
0
 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);
         MonthRpt objRpt = new MonthRpt();
         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 Month(Sales_date)='" + Request.QueryString["Month"] + "' and Year(Sales_date)='" + Request.QueryString["Year"] + "' group by Bill_no,Sales_date ");
         crystalReport.SetDataSource(a.DT);
         crystalReport.SetParameterValue("month", mnth);
         crystalReport.SetParameterValue("year", Request.QueryString["Year"].ToString());
         CrystalReportViewer1.ReportSource = crystalReport;
     }
 }