示例#1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rpLuongTong rpt = new rpLuongTong();

            rpt.Site = this.Site;
            return(rpt);
        }
示例#2
0
        public void loadRepport(DataTable dataTable)
        {
            dataSet.Tables[0].Merge(dataTable);
            rpLuongTong rpLuongTong = new rpLuongTong();

            ParameterFields        pField              = new ParameterFields();
            ParameterField         pTruongKeToan       = new ParameterField();
            ParameterDiscreteValue pTruongKeToan_value = new ParameterDiscreteValue();

            pTruongKeToan_value.Value        = "Danh Thanh";
            pTruongKeToan.ParameterFieldName = "TruongKeToan";
            pTruongKeToan.CurrentValues.Add(pTruongKeToan_value);
            pField.Add(pTruongKeToan);

            ParameterField         pTenQuan       = new ParameterField();
            ParameterDiscreteValue pTenQuan_value = new ParameterDiscreteValue();

            pTenQuan_value.Value        = "Quán Karaoke Nice";
            pTenQuan.ParameterFieldName = "TenQuan";
            pTenQuan.CurrentValues.Add(pTenQuan_value);
            pField.Add(pTenQuan);

            ParameterField         pDiaChiQuan       = new ParameterField();
            ParameterDiscreteValue pDiaChiQuan_value = new ParameterDiscreteValue();

            pDiaChiQuan_value.Value        = "123 Đinh Tiên  Hoàng, quận 10, Tp. Hồ Chí Minh";
            pDiaChiQuan.ParameterFieldName = "DiaChiQuan";
            pDiaChiQuan.CurrentValues.Add(pDiaChiQuan_value);
            pField.Add(pDiaChiQuan);

            crLuongTong.ParameterFieldInfo = pField;
            rpLuongTong.SetDataSource(dataSet.Tables[0]);
            crLuongTong.ReportSource = rpLuongTong;

            dataSet.Tables[0].Reset();
        }