private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (desde.Text != "" && hasta.Text != "")
                {
                    dgv.DataSource = sql.realizainfor(desde.Text, hasta.Text);
                }

                else
                {
                    dgv.DataSource = sql.MuestraRegsitros();
                }

                ExportWithExel rp = new ExportWithExel();


                //datos del cliente



                //detalles fac


                for (int i = 0; i < dgv.Rows.Count; i++)
                {
                    report datos = new report();



                    datos.FECHA        = (string)this.dgv.Rows[i].Cells[0].Value;            //fecha
                    datos.RET          = (string)this.dgv.Rows[i].Cells[1].Value;            //no fac
                    datos.CODIGO       = (string)this.dgv.Rows[i].Cells[2].Value;            //codigo fac
                    datos.DESCRPP      = (string)this.dgv.Rows[i].Cells[3].Value;            //descripcion fac
                    datos.fax          = (string)this.dgv.Rows[i].Cells[4].Value;            //lote
                    datos.PRESENTACION = (string)this.dgv.Rows[i].Cells[5].Value;            //presentacion
                    datos.CANTIDAD     = (string)this.dgv.Rows[i].Cells[6].Value.ToString(); //catidad
                    datos.PRECIOU      = (string)this.dgv.Rows[i].Cells[7].Value;            //costo
                    datos.SUB          = (string)this.dgv.Rows[i].Cells[8].Value;            //costo total
                    datos.ITBIS        = (string)this.dgv.Rows[i].Cells[9].Value;            //precio
                    datos.PRECIOT      = (string)this.dgv.Rows[i].Cells[10].Value;           //precio total
                    datos.telefono     = (string)this.dgv.Rows[i].Cells[11].Value;           //utilidad



                    datos.ORDEN = desde.Text;
                    datos.VALID = hasta.Text;



                    rp.Inf.Add(datos);
                }



                rp.ShowDialog();
                dgv.DataSource = sql.MuestraRegsitros();
            }
            catch (Exception loer)
            {
                MessageBox.Show("Algo Va Mal..." + loer);
            }
        }