ASP Database

  • Thread starter Thread starter PaulJ
  • Start date Start date
P

PaulJ

Guest
As part of an active server web site I created a database for products containing Product Name, Price, Picture etc.
In order for the picture to show up in the web page the Picture field was set up as a text field with the entries as path/file.jpg

This all worked fine but I now find I want an access report that shows th picture along with the rest of the details in a report - and I can't get it to work.

The report just shows the text for the location of the picture ie pics/file.jpg

Is there any way I can convert this field to have the actual pic show up in the report??
My efforts thus far have revolved around converting the field to a hyperlink - this just gives it a URL of http://pic/file.jpg unless I edit each one by hand and even then I can't get the pic to show in the report (I have about 350 pics). also converting the field to OLE just changes the pic/file.jpg text to Long Binary ... for every picture.

Any thoughts???
Thx in advance
 
Not Really

I don't think it does what I need - or I'm not 100% sure how it could.

what I need is to conver the existing (text) referance in my database to a format that allows the image to appear in an Access report along with the other descriptive fields.
ie:
Prod_Name, Prod_Price, [actual product image]

as opposed to what I have now:
Prod_Name, Prod_Price, pics/image1.jpg (as text)

Here is a link to the (stripped down) DB and a few pic files that might explain better

http://www.thurschild.com/pics.zip

thx in advance
 
PaulJ,

I used a query to create a new table extracting all the data but extracting the path and the .jpg image names into two separate fields. ie

ImgName: Right([Product_small_pic],7)

Takes the last 7 letters from where your pics are stored " C:\Documents and Settings\temp\Desktop\New Folder\ps1.jpg" only takes "ps1.jpg" and creates a column called ImgName

and

ImgPath: Left([Product_small_pic],50)

Takes the first 50 letters "C:\Documents and Settings\temp\Desktop\New Folder\" and creates a column called ImgPath.

Then it was just a case of creating the report with an image control (here Image1) and adding the following code to the Detail section:

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
On Error Resume Next
Me!Image1.Picture = Me!ImgPath & Me!ImgName

End Sub

Hope this helps

IMO
 

Attachments

Well, its either a famine or a feast with solutions.

I took the simple option and just made the path to the folder a variable. Change it under the OnFormat event of the Detail section of the report
 

Attachments

Users who are viewing this thread

Back
Top Bottom