通過下面代碼將blob型別保存為圖片后
blob lb_picture
integer li_FileNum
String ls_Path ,ls_errtext
Selectblob blob_zd into :lb_picture from table_name where l_name = '201207';
li_FileNum = FileOpen( 'd:\123.gif',StreamMode!, Write!, Shared!,Append!)
if li_FileNum = -1 then
fileclose(li_filenum)
end if
FileWrite(li_FileNum, lb_picture)
fileclose(li_filenum)
在datawindow中用picture空間打開圖片,上面的編輯界面有圖片,而下面的預覽則是空的
在window表單的picture控制元件setpicture(blob)這個在表單中能顯示;
已經bmp、jpg、gif這三個都不行(jpg在datawindow直接報錯:Not a JPEG file: starts with 0x47 0x49)已經核實blob生成的圖片檔案格式是gif的,
把生成的圖片放到word檔案中列印預覽又可以看見
唯獨在datawindow中不行
如圖:

控制元件屬性:
uj5u.com熱心網友回復:
改為計算列,運算式為Bitmap("d:\111.gif"),試試uj5u.com熱心網友回復:
試了,還是不行。和之前一樣的問題,效果是一樣的
uj5u.com熱心網友回復:
'' as tjqm,'' as tzqm 這是datawindow物件里面的兩列 所有屬性都默認ls_type = 'l'
ll_yzh = This.Tab_yz.tabpage_lsyz.dw_zyys_lsyz.Object.yzh[i]
ls_sflx = This.Tab_yz.tabpage_lsyz.dw_zyys_lsyz.Object.sflx[i]
ls_path = 'ca\temp'+ls_type+String(ll_yzh)+'.bmp'
//提交簽名
select count(*) into :ll_count from ca_zy_qz_ys_m where zyh = :is_zyh and cqls = :ls_type and yzh = :ll_yzh and sflx = :ls_sflx and tjys_status = '1';
if ll_count <= 0 then
continue;
end if
//讀取圖片
SelectBlob tjys_pic Into :lb_pic From ca_zy_qz_ys_m where zyh = :is_zyh and cqls = :ls_type and yzh = :ll_yzh and sflx = :ls_sflx and tjys_status = '1';
IF in_cst_ca_pic.uf_pic_read(ls_path,lb_pic) = True THEN
This.Tab_yz.tabpage_lsyz.dw_zyys_lsyz.Object.tjqm[i] = ls_path
else
This.Tab_yz.tabpage_lsyz.dw_zyys_lsyz.Object.tjqm[i] = ''
END IF
看看你能不能看懂 直接把下載下來的圖片路徑賦值給列就能顯示圖片 也能列印也能預覽
uj5u.com熱心網友回復:
這是個偽gif。https://www.cnblogs.com/sunsoft/archive/2012/01/04/2311989.html
uj5u.com熱心網友回復:
譬如上圖,實際是個png,而不是jpg轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/18117.html
標籤:DataWindow
