Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Displaying and Printing Images on VFP8 Reports
Message
From
01/12/2006 02:02:35
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Displaying and Printing Images on VFP8 Reports
Miscellaneous
Thread ID:
01174010
Message ID:
01174010
Views:
59
Hi,

I want to display a bitmap image on VFP report dynamically. Basically, I want to print a Certificate Report wherein I can change the certified by portion. Each certified by professional has its own image / digital signature that I want to be printed on the report.

What I initially did is to dynamically build the image file by creating a procedure like the one below

PROCEDURE getimage(lpFileName, lpMemoBinFld)
LOCAL lcTemp as String
lcTemp = ADDBS(SYS(2023)) + "JPGTEMP\"
IF !DIRECTORY(lcTemp)
MD (lcTemp)
ENDIF
SET SAFETY OFF
STRTOFILE(lpMemoBinFld, lcTemp + lpFileName)
SET SAFETY ON
RETURN lcTemp + lpFileName

this procedure will automatically create c:\temp\jpgtemp\signature1.bmp.

In the frx, I put an ole control and assigned the following
Control Source Type = Expression or Variable name
Control Source = getimage('signature1.bmp',curProfessionals.signature)

curProfessionals.signature = a memo field that contains the filetostr() value of the image.

after previewing the report, I make sure that the temporary file is deleted by executing the following code.
ERASE ADDBS(SYS(2023)) + "JPGTEMP\*.bmp"
RD ADDBS(SYS(2023)) + "JPGTEMP"

The file is being created and deleted dynamically. The only problem is that if I chage the certified by portion the image in the hard disk is also changed dynamically but the report preview still display's the old image.
If I exit the system and preview the report again, the correct image is displayed.

How can I refresh the buffer of the report so that It will display the current image based on the disk.

Please help. Thanks in advance...
Music Rocks www.musicreserve.blogspot.com
Success is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.
Next
Reply
Map
View

Click here to load this message in the networking platform