Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            CRVentCredContDia rpt = new CRVentCredContDia();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void btnReporte_Click(object sender, EventArgs e)
        {
            CRVentCredContDia     rpt = new CRVentCredContDia();
            frmRptVentCredContDia frm = new frmRptVentCredContDia();
            //rpt.SetDataSource(ds.Reporte(frmLogin.iCodSucursal, dtpFecha1.Value, dtpFecha2.Value, Convert.ToInt32(cmbFormaPago.SelectedValue)).Tables[0]);
            DataTable dt = ds.Reporte(frmLogin.iCodEmpresa, dtpFecha1.Value, dtpFecha2.Value, Convert.ToInt32(cmbFormaPago.SelectedValue), frmLogin.iCodSucursal, frmLogin.iCodAlmacen).Tables[0];

            if (dt.Rows.Count > 0)
            {
                rpt.SetDataSource(dt);
                frm.crvRptVentCredContDia.ReportSource = rpt;
                //frm.crvRptVentCredContDia.ReportSource = rpt;
                frm.Show();
            }
        }