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

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

            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);

            crBaoCaoLuong.ParameterFieldInfo = pField;


            rpLuong.SetDataSource(dataSet.Tables[0]);
            rpLuong.Refresh();
            crBaoCaoLuong.ReportSource = rpLuong;
            dataSet.Tables[0].Reset();
        }