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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting images (from links) into reports

Status
Not open for further replies.

Squeaks

MIS
Apr 25, 2003
18
GB
Hi Everybody

I'm looking into the possibility of creating access reports and labels which when printed would include a unique image for each record. Unfortunately the images are not stored within any database but only as a file path/location string attached to each record.

In effect, at printing time, this path text string should be interpreted and the image printed instead (the images being photos of people in this case).

I'm a noob and have very little idea if such a routine is possible! So any other suggestions would be most welcome.

Any help or guidance appreciated

Squeaks
 
eesh..I've discovered the answer!!!

A quick search of these forums and an lo behold an excellent response by scriverb to a similar question and all the worlds problems are as the wind :D

and works too ;)

 
I was just going to refer you to that thread. Glad that you found for yourself.

Bob Scriver
 
Hi there I am developing an application where I will be scanning and saving the images. I would like to save the images on the hard drive and not in the database.

What is the best way to accomplish this.

I would really appreciate your help.

Thanks in advance.

Ctanna
 
ctanna: Here is the link that Squeaks is referring to. This should help you to understand how to keep your .jpgs in your hard drive and have them linked to the records in your tables and displayed in forms and reports.

Good luck.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
I am sorry. I was perusing these threads and saw that I posted an incomplete answer here. The following thread will help you in your quest to keep .jpgs on your harddrive but display them in your database forms and reports:

thread702-289543


Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
I've used this code for images (tif) - works great except about the 10th image (not always the 10th - not always the same file) is loaded, I get an error message: Run-time error '2114': database doesn't support the format of the file -path.tif, so it can't load the picture.

Thanks
 
I doubt that it is the code that is causing this problem. Please check the path and filename of this 10th file. Actually try to open this exact file and see if the file is corrupt or if you cannot open it. You realize that .tif files are quite large in the amount of information stored. The display of pictures on the screen needs only be saved as .jpg at 72 dpi to be viewed in the best viewing capability.

Let me know what you find.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
The files open fine - I've tried the ones the errors happen on, I notice that someone else had the same problem about a year ago - it wasn't resolved. I have no choice about the type of file because there are a lot of pics in this system (with the query it's narrowed down to about 18000 in the report).

Thanks for your help - any suggestions are greatly appreciated.
 
I will test this out here on my PC and see if I get the same results.

Will post back with results and maybe a solution.

Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Hi Bob

I know this is an old thread but I have come across it trying to find a solution to the runtime error 2114. The file I am using opens ok and is small (72kb) and I have tried it as a jpg, bmp and emf file (all of which open and appear normal).

I am running a report with a small logo at the top and this is what is causing problems.

Interestingly, when the error message is displayed, there seems to be a comma inserted at the end of the path and file name like this :-

2114: System doesn't support the format of the file 'D:\pathname\filename,'

As the pathname can change depending on which PC the system is running on, I move the path and file name WITHOUT the comma into the picture property of the logo control field in the open procedure of the report like this:-

strpath = 'D:\pathname\filename'
me!logo.picture = strpath

the strpath contents look perfectly normal (and there are no syntax errors as far as I can see).

I am stumped as I am not getting the same error using similar syntax on a form.

Any help would be gratefully received!
 
Do a little test in your code. Use the following and let's see if there is an actual comma(,) at the end of the string.

Code:
strpath = 'D:\pathname\filename'
me!logo.picture = strpath
stop

Now in the immediate window enter:

?strpath

Then RETURN key

Comma???

Now do the same with Me!logo.picture

Comma??



[COLOR=006633]Bob Scriver[/color]
MIState1.gif
[COLOR=white 006633]MSU Spartan[/color]
 
Have resolved the problem.

The .emf file was ok but the others were corrupted even though they appeared to functioning normally. I recreated each type of file properly and it works.

Sorry to waste your time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top