PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WB20] Image control in report
[WB20] Image control in report
Iniciado por guest, 05,sep. 2016 09:16 - 4 respuestas
Publicado el 05,septiembre 2016 - 09:16
Hi,

If i linked the image control in a report to a database image ( binary memo), no issue.
When i print the pdf, i can see the image..

But when i use code to assign the image control to the binary memo, i cannot see the image in the pdf, what's wrong ?
IMG_PHOTO = MyPhoto.Photo

What am i missing ?

Regards,

PETER ZHOU
Publicado el 05,septiembre 2016 - 14:24
Hi

What is "MyPhoto"?
Did you try from a file from disk ?

Best regards
Publicado el 05,septiembre 2016 - 16:05
Hi Fabrice,

Under webdev, i did assign by using the following code: IMG_PHOTO = MyPhoto.Photo
where "MyPhoto" is a file from disk and "Photo" is the file item.

Regards,

PETER ZHOU
Publicado el 07,septiembre 2016 - 00:22
Hi,

Where do you use this code? There are several options.

Indeed I have had a similar fault. The coding of the report didnot work all the time. hitting the save button in the report helped

I have reports that users can create form templates. It seems that in some cases windev seems to loose the connection. That is the reson why it doesnot get the image. It cannot find the file.

Solution: no programming, or minimal programming in the reports.

So use the databinding and no or minimal programming in the report

regards
Allard
Publicado el 07,septiembre 2016 - 09:05
Peter,

maybe NOT linking the imagecontrol to a fileitem directly will work better.
So extract the photo from the database to a file on disk using HExtractMemo().
Then assign it to your imagecontrol in code i.e. "before printing BODY"