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

            rpt.Site = this.Site;
            return(rpt);
        }
        public FormReportedeClientes()
        {
            InitializeComponent();

            var _clientes    = new ClienteBL();
            var _tipoCliente = new TiposBL();

            var bindingSource = new BindingSource();

            bindingSource.DataSource = _clientes.ObtenerClientes();

            var bindingSource2 = new BindingSource();

            bindingSource2.DataSource = _tipoCliente.ObtenerTipo();

            var reporte = new ReporteClientes();

            reporte.Database.Tables["Clientes"].SetDataSource(bindingSource);
            reporte.Database.Tables["Tipo"].SetDataSource(bindingSource2);

            crystalReportViewer1.ReportSource = reporte;
            crystalReportViewer1.RefreshReport();
        }