Exemplo n.º 1
0
        public void ConsumoxLapso()
        {
            FrmLapso f = new FrmLapso();

            f.Text = "Ventas x Lapso";
            f.ShowDialog();
            if (f.DialogResult != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            List <IngredientesConsumo> lista = Basicas.ConsumoPlatosxLapso(f.desde, f.hasta);

            reportViewer1.ProcessingMode = ProcessingMode.Local;
            this.reportViewer1.LocalReport.ReportPath = Application.StartupPath + "\\Reportes\\ConsumoxLapso.rdlc";
            this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Consumo", Basicas.ConsumoPlatosxLapso(f.desde, f.hasta)));
            this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("Parametros", new Parametro[] { Basicas.parametros() }));
            this.reportViewer1.LocalReport.SetParameters(new ReportParameter("Lapso", string.Format("Desde:{0} Hasta:{1}", f.desde.ToShortDateString(), f.hasta.ToShortDateString())));
            this.reportViewer1.RefreshReport();
            this.ShowDialog();
        }