Example #1
0
        private void GetReporteVentas(DateTime fromDate, DateTime toDate)
        {
            var reporte = new ReporteDeVentas(fromDate, toDate);

            //reporte.CrearSalesReport(fromDate,toDate);
            reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("ReporteDeVentas", reporte.ListadoVentas));
            reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("SalesListin", reporte.ListadoVentas));
            reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("VentasPorPeriodo", reporte.ventasPorPeriodos));
            this.reportViewer1.RefreshReport();
        }
 private void reporteDeVentasToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (reporteDeVentas == null)
     {
         reporteDeVentas             = new ReporteDeVentas();
         reporteDeVentas.MdiParent   = this;
         reporteDeVentas.FormClosed += new  FormClosedEventHandler(cerrarReporteVentas);
         reporteDeVentas.Show();
     }
     else
     {
         reporteDeVentas.Activate();
     }
 }
 private void cerrarReporteVentas(object sender, FormClosedEventArgs e)
 {
     reporteDeVentas = null;
 }