예제 #1
0
        public void ComisionesMesonerosFecha()
        {
            FrmLapso f = new FrmLapso();

            f.Text = "Comisiones x Mesoneros";
            f.ShowDialog();
            if (f.DialogResult != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            var lista = Basicas.TotalFacturasDiariasxLapso(f.desde, f.hasta);

            reportViewer1.ProcessingMode = ProcessingMode.Local;
            this.reportViewer1.LocalReport.ReportPath = Application.StartupPath + "\\Reportes\\ComisionesMesoneros.rdlc";
            this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("TotalxDia", lista.ToList()));
            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();
        }