public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            reporteRutasFrecuentes rpt = new reporteRutasFrecuentes();

            rpt.Site = this.Site;
            return(rpt);
        }
Example #2
0
        private void frmRutasFrecuentes_Load(object sender, EventArgs e)
        {
            comboBoxEmpresas = control.consultarEmpresas(comboBoxEmpresas);
            reporteRutasFrecuentes nuevoReporte = new reporteRutasFrecuentes();

            nuevoReporte.SetDataSource(control.ObtenerReporteRutasFrecuentes());
            rutasFrecuentes = control.ObtenerReporteRutasFrecuentes();

            crystalReportViewer1.ReportSource = nuevoReporte;
        }
Example #3
0
        private void comboBoxEmpresas_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataView copia = new DataView(control.ObtenerReporteRutasFrecuentes());

            copia.RowFilter = "nombreEmpresa like '%" + comboBoxEmpresas.Text + "%'";
            reporteRutasFrecuentes nuevoReporte = new reporteRutasFrecuentes();

            nuevoReporte.SetDataSource(copia.ToTable());
            rutasFrecuentes = copia.ToTable();
            crystalReportViewer1.ReportSource = nuevoReporte;
        }
Example #4
0
        private void buttonFiltrarFecha_Click(object sender, EventArgs e)
        {
            DataView copia = new DataView(rutasFrecuentes);

            copia.RowFilter = " (FechaInicio >= #" +
                              Convert.ToDateTime(dateTimeDesde.Text).ToString("MM/dd/yyyy") +
                              "# And FechaInicio <= #" +
                              Convert.ToDateTime(dateTimeHasta.Text).ToString("MM/dd/yyyy") +
                              "# ) ";

            reporteRutasFrecuentes nuevoReporte = new reporteRutasFrecuentes();

            nuevoReporte.SetDataSource(copia.ToTable());
            rutasFrecuentes = copia.ToTable();
            crystalReportViewer1.ReportSource = nuevoReporte;
        }