Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Signiture image in report

Status
Not open for further replies.

neemi

Programmer
May 14, 2002
519
GB
I have scanned images of users signatures and need to add it to a report. The signature to be shown on the report is dependent on the user using the database.

Does anyone know the easiest way to to this?

Help appreciated.

Cheers,

Neemi
 
Title your scanned images with the User name (i.e. scriverb.jpg ) and put them all in one folder on the server.

Create a ImageControl in the location on your report. The property .PictureType should be linked, and the .Picture property can be changed with the following entry:

Code:
"g:\datafiles\sigImages\" & CurrentUser() & ".jpg"

I think that this will will pickup the image from your server folder location and use the CurrentUser() function to provide the name of the file, and then the extension can be .jpg or .bmp. Your choice.

Give that try and let me know if it works. Just taking a stab at it without testing. We can surely get this to work in some fashion.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Did a little testing here and we have to modify this slightly. Set the .Picture property of the Image Control to (None). Just highlight and delete what is there.

Now in the OnOpen Event Procedure of the Detail section of your report put the following line of code:

Code:
Me![Signature].Picture = "G:\datafiles\sigImages\" & CurrentUser() & ".jpg"

This works great. You will just have to setup the size of the signature files to coincide with the image control size to make it look correctly. There are parameters to help with that. SizeMode set to Stretch and Picture Alighment set to Upper Left seems to help with this very well.

Good luck.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Cheers for your help, I was thinking of doing something like that however when I place an image in my report and try to set the .picture prperty to none by hightlightling and deleting it removes the whole image control off the report.

Any idea's?

I was thinking of just creating a blank image or something?
 
Then creat a dummy signature image and place that .jpg file in the folder. Set the .picture property to that path and image. this will hold the image property in place. Now when you run the report the code will change it to the signature image of the user.


Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top