コード例 #1
0
ファイル: crVentasEmp.cs プロジェクト: jluisacosta/ICS
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crVentasEmp rpt = new crVentasEmp();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
ファイル: FVentasEmp.cs プロジェクト: jluisacosta/ICS
        public void cargarReporte()
        {
            MySqlDataAdapter adapter;

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

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

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

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

                case 2:    //Ambos
                    reporte = new crVentasEmp();
                    reporte.SetDataSource(ds);
                    crv.ReportSource = reporte;
                    break;
                }
            }
            catch (FormatException fex)
            {
                MessageBox.Show(fex.Message);
            }
        }
コード例 #3
0
ファイル: FVentasEmp.cs プロジェクト: jluisacosta/ICS
        public void cargarReporte()
        {
            MySqlDataAdapter adapter;

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

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

                switch (cb_tipo.SelectedIndex)
                {
                    case 0://Texto
                        reportetxt = new crVentasEmpT();
                        reportetxt.SetDataSource(ds);
                        crv.ReportSource = reportetxt;
                        break;
                    case 1://Grafica
                        reporteg = new crVentasEmpG();
                        reporteg.SetDataSource(ds);
                        crv.ReportSource = reporteg;
                        break;
                    case 2://Ambos
                        reporte = new crVentasEmp();
                        reporte.SetDataSource(ds);
                        crv.ReportSource = reporte;
                        break;
                }
            }
            catch(FormatException fex)
            {
                MessageBox.Show(fex.Message);
            }
        }
コード例 #4
0
 public FVentasEmp()
 {
     InitializeComponent();
     con     = new MySqlConnection("server=localhost;user id=root;password=root;database=si_inventarios");
     reporte = new crVentasEmp();
 }
コード例 #5
0
ファイル: crVentasEmp.cs プロジェクト: jluisacosta/ICS
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     crVentasEmp rpt = new crVentasEmp();
     rpt.Site = this.Site;
     return rpt;
 }