Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying and Printing Images on VFP8 Reports
Message
De
01/12/2006 02:02:35
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Displaying and Printing Images on VFP8 Reports
Divers
Thread ID:
01174010
Message ID:
01174010
Vues:
61
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform