Quantcast
Channel: SCN : All Content - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2935

print a picture

$
0
0

I am trying to print ID card from record in a database. I used the SelectBlob to retrieve the picture image and added it to a picture field in the datawindow. In the preview the picture did not show at all so I could not print it. Here is the Open event script:

Selectblob member_picture

into :lblb_out

from abc_member

Where member_key = :gs_member;

If SQLCA.SQLCODE <> o then

  messagebox("Selectblob ", "Failed")

END IF

tempfile = FileOpen("C:\Member\memb4.bmp",streammode!, Write!, LockreadWrite!, Replace)

writepic = filewrite(tempfile, lblb_out)

ls_image = "c:\member\memb4.bmp"

dw_card.object.p_1.filename = ls_image

dw_card.object.p_1.originalsize = False

dw_card.Object.p_1.width = 8

dw_card.Object.p_1.height = 5

 

the window with the datawindow get displayed with no picture at all. All the other fields are displayed and can be printed.

the file ls_image created in the C:\Member contains the truncated picture

 

Please help.

Placide


Viewing all articles
Browse latest Browse all 2935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>