Beispiel #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            YearRpt rpt = new YearRpt();

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        private void GetReport()
        {
            if (Request.QueryString["Year"] != null)
            {
                YearRpt objRpt = new YearRpt();
                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 Year(Sales_date)='" + Request.QueryString["Year"] + "' group by Bill_no,Sales_date ");
                crystalReport.SetDataSource(a.DT);

                crystalReport.SetParameterValue("year", Request.QueryString["Year"].ToString());
                CrystalReportViewer1.ReportSource = crystalReport;
            }
        }