Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crPorcentaje rpt = new crPorcentaje();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
 public FPorcentaje()
 {
     InitializeComponent();
     con     = new MySqlConnection("server=localhost;user id=root;password=root;database=si_inventarios");
     reporte = new crPorcentaje();
     cb_mmv.SelectedIndex = 0;
     top_less             = "DESC";
 }
Пример #3
0
 public FPorcentaje()
 {
     InitializeComponent();
     con = new MySqlConnection("server=localhost;user id=root;password=root;database=si_inventarios");
     reporte = new crPorcentaje();
     cb_mmv.SelectedIndex = 0;
     top_less = "DESC";
     cb_tipo.SelectedIndex = 0;
 }
Пример #4
0
        public void cargarReporte()
        {
            MySqlDataAdapter adapter;

            fechaIni = dtp.Value.Year.ToString() + "/" + dtp.Value.Month.ToString() + "/" + dtp.Value.Day.ToString();
            fechaFin = dtp2.Value.Year.ToString() + "/" + dtp2.Value.Month.ToString() + "/" + dtp2.Value.Day.ToString();

            try
            {
                crearConsulta();
                ds      = new dataSet_inventarios();
                adapter = new MySqlDataAdapter(query, con);
                adapter.Fill(ds, "Porcentaje_Prov");

                switch (cb_tipo.SelectedIndex)
                {
                case 0:    //Texto
                    reportetxt = new crPorcentajeT();
                    reportetxt.SetDataSource(ds);
                    crv.ReportSource = reportetxt;
                    break;

                case 1:    //Grafica
                    reporteg = new crPorcentajeG();
                    reporteg.SetDataSource(ds);
                    crv.ReportSource = reporteg;
                    break;

                case 2:    //Ambos
                    reporte = new crPorcentaje();
                    reporte.SetDataSource(ds);
                    crv.ReportSource = reporte;
                    break;
                }
            }
            catch (FormatException fex)
            {
                MessageBox.Show(fex.Message);
            }
        }
Пример #5
0
        public void cargarReporte()
        {
            MySqlDataAdapter adapter;

            fechaIni = dtp.Value.Year.ToString() + "/" + dtp.Value.Month.ToString() + "/" + dtp.Value.Day.ToString();
            fechaFin = dtp2.Value.Year.ToString() + "/" + dtp2.Value.Month.ToString() + "/" + dtp2.Value.Day.ToString();

            try
            {
                crearConsulta();
                ds = new dataSet_inventarios();
                adapter = new MySqlDataAdapter(query, con);
                adapter.Fill(ds, "Porcentaje_Prov");

                switch (cb_tipo.SelectedIndex)
                {
                    case 0://Texto
                        reportetxt = new crPorcentajeT();
                        reportetxt.SetDataSource(ds);
                        crv.ReportSource = reportetxt;
                        break;
                    case 1://Grafica
                        reporteg = new crPorcentajeG();
                        reporteg.SetDataSource(ds);
                        crv.ReportSource = reporteg;
                        break;
                    case 2://Ambos
                        reporte = new crPorcentaje();
                        reporte.SetDataSource(ds);
                        crv.ReportSource = reporte;
                        break;
                }
            }
            catch(FormatException fex)
            {
                MessageBox.Show(fex.Message);
            }
        }
Пример #6
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     crPorcentaje rpt = new crPorcentaje();
     rpt.Site = this.Site;
     return rpt;
 }