public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CrystalReportCHITIETTHANHTOANNCC rpt = new CrystalReportCHITIETTHANHTOANNCC();

            rpt.Site = this.Site;
            return(rpt);
        }
Exemple #2
0
        private void buttonVIEW_Click(object sender, EventArgs e)
        {
            var           _ncc  = long.Parse(comboBoxNCC.SelectedValue.ToString());
            var           _from = dateTimePickerFROM.Value.Date;
            var           _to   = dateTimePickerTO.Value.Date;
            BindingSource bs    = new BindingSource();

            bs.DataSource = (from _n in DataInstance.Instance().DBContext().TRA_NO_NCC
                             join _kho in DataInstance.Instance().DBContext().KHOes on _n.MAKHO equals _kho.ID
                             where _n.MANCC == _ncc
                             where _n.NGAY_TRA >= _from && _n.NGAY_TRA <= _to
                             select new CChiTietThanhToanNCC
            {
                NGAY = _n.NGAY_TRA,
                THANHTOAN = _kho.NAME,
                TONGTIEN = _n.TONG_TIEN
            }
                             );
            CrystalReportCHITIETTHANHTOANNCC rpt = new CrystalReportCHITIETTHANHTOANNCC();

            rpt.SetDataSource(bs);
            rpt.SetParameterValue("NCC", comboBoxNCC.Text);
            rpt.SetParameterValue("FROM", _from);
            rpt.SetParameterValue("TO", _to);
            rpt.SetParameterValue("COMP", ConstClass.COMPANY_NAME);
            crystalReportViewer1.ReportSource = rpt;
        }