private void GenerarCodigoBarras(string code) { if (code != null) { Reportes.Code39 c39 = new Reportes.Code39(); MemoryStream ms = new MemoryStream(); c39.FontFamilyName = "Free 3 of 9"; c39.FontFileName = Server.MapPath("FREE3OF9.TTF"); c39.FontSize = 30; c39.ShowCodeString = true; System.Drawing.Bitmap objBitmap = c39.GenerateBarcode(code); objBitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp); codigobarrasRpt = facturaRpt.OpenSubreport("CodigoBarra.rpt"); CrearTabla(); DataRow dr = this.dsImages.Tables["images"].NewRow(); dr["path"] = "ninguno"; dr["image"] = ms.ToArray(); this.dsImages.Tables["images"].Rows.Add(dr); codigobarrasRpt.SetDataSource(this.dsImages); } }