예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReporteCompras rpt = new ReporteCompras();

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var fechainicial = dateTimePicker1.Value;
            var fechafinal   = dateTimePicker2.Value;

            var bindingSource = new BindingSource();

            bindingSource.DataSource = _comprasBL.ObtenerCompras(fechainicial, fechafinal);

            var reporte = new ReporteCompras();

            reporte.SetDataSource(bindingSource);


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