FastReport图片的展示

图片展示:

AfterData事件
CodeList.pic为文本
 ///加载图片
    private void Picture1_AfterData(object sender, EventArgs e)
    {
      string imgStr=((String)Report.GetColumnValue("CodeList.pic"))  ;
      // MessageBox.Show(imgStr);
      if (string.IsNullOrEmpty(imgStr))
      {
        Picture1.Visible=false;
        return;
      }
      byte[] imgData=Convert.FromBase64String(imgStr);
      MemoryStream ms = new MemoryStream(imgData);
      Image img = System.Drawing.Image.FromStream(ms);
      Picture1.Image=img;
    }

 

posted on 2023-01-31 08:42  RookieBoy666  阅读(164)  评论(0编辑  收藏  举报