response.write and aspEasypdf

Dear Experts

I am using dreamweaver, asp & sql 2005.  I am also using aspEasypdf to generate a report from database data to pdf.

I am able to get the data output to the PDF fine, however one of the columns stores a path to and image file and I would like to display each image next to the appropriate row of data.  

Please see my full code below in the snippet which works fine for the data output to pdf - however the line response.write "<td>" & propertylist("pPhoteFile") & "</td>" actually prints the image filename instead of pulling the image and placing it into the PDF.

Thanks in advance for any help

Grant
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/camsmith.asp" -->
<%
Dim propertylist__MMColParam
propertylist__MMColParam = "Sold"
If (Request("MM_EmptyValue") <> "") Then 
  propertylist__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim propertylist
Dim propertylist_cmd
Dim propertylist_numRows
 
Set propertylist_cmd = Server.CreateObject ("ADODB.Command")
propertylist_cmd.ActiveConnection = MM_camsmith_STRING
propertylist_cmd.CommandText = "SELECT * FROM dbo.Property LEFT OUTER JOIN  dbo.countnotesofinterest on dbo.property.pRef = dbo.countnotesofinterest.nPref LEFT OUTER JOIN dbo.countsurveys on dbo.property.pRef = dbo.countsurveys.sPref WHERE pStage <> ? and pStage <> 'Pre Sale' and pStage <> 'Withdrawn' and pPropertyType = 'ResSale' ORDER BY pPrice DESC" 
propertylist_cmd.Prepared = true
propertylist_cmd.Parameters.Append propertylist_cmd.CreateParameter("param1", 200, 1, 15, propertylist__MMColParam) ' adVarChar
 
Set propertylist = propertylist_cmd.Execute
propertylist_numRows = 0
%>
<html>
 
<head>
<title>Easi Property - Current Residential For Sale</title>
</head>
 
<body bgcolor="#FFFFFF">
 
<p><font size="6" color="#057ca6"><b><u>Current Residential For Sale</u></b></font></p>
 
 
<table border="1" width="100%">
  <tr>
    <td colspan="3"><img src="../../propertyphotos/<%=(propertylist.Fields.Item("pPhoteFile").Value)%>" alt="property image" width="122" height="81" hspace="5" vspace="5" /><font color="#FFFFFF">Tables support</font></td>
  </tr>
</table>
 
 
<%
fp_sQry = "SELECT * FROM dbo.Property LEFT OUTER JOIN  dbo.countnotesofinterest on dbo.property.pRef = dbo.countnotesofinterest.nPref LEFT OUTER JOIN dbo.countsurveys on dbo.property.pRef = dbo.countsurveys.sPref WHERE pStage <> 'Sold' and pStage <> 'Pre Sale' and pStage <> 'Withdrawn' and pPropertyType = 'ResSale' ORDER BY pPrice DESC"
set propertylist  = CreateObject("ADODB.Recordset")
strConnString = MM_camsmith_STRING
 
propertylist.Open fp_sQry, strConnString
if Err.Description <> "" Then
    Response.Write "<B>Error: " + Err.Description + "</B>"
    Response.Write "<br><B>SQL: " + fp_sQry + "</B>"
Else
 
 
 
 
 
	response.write "<table border=""1"">"
	
		response.write "<tr>"
		response.write "<td>" & "Property Photo" & "</td>"
		response.write "<td>" & "Property Address" & "</td>"
		response.write "<td>" & "Price" & "</td>"
		response.write "<td>" & "Status" & "</td>"
	
 
 
Do Until propertylist.EOF
		response.write "<tr>"
		response.write "<td>" & propertylist("pPhoteFile") & "</td>"
		response.write "<td>" & propertylist("pAddress1") & ", " & propertylist("pAddress2") & propertylist("pTown") & "</td>"
		response.write "<td>" & propertylist("pPriceType") & "£" & propertylist("pPrice") & "</td>"
		response.write "<td>" & propertylist("pStage") & "</td>"
		response.write "</tr>"
		propertylist.MoveNext
	Loop
	response.write "</table>"
End If
propertylist.Close
set propertylist = nothing
%>
 
 
 
 
</body>
</html>

Open in new window

grantballantyneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

b0lsc0ttIT ManagerCommented:
grantballantyne,

Does the image at the top of the table get placed in the PDF?  I am not familiar with tthat tool but I believe the problem is just not using the img tag.  Try ...

            response.write "<td><img src=""../../propertyphotos/" & propertylist("pPhoteFile") & """ alt="""" /></td>"

The path for the src may not be right and you may need to provide other attributes in the img tag.

Let me know if you have any questions or need more information.

b0lsc0tt
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
grantballantyneAuthor Commented:
Thanks b0lsc0tt

thats worked a treat
0
b0lsc0ttIT ManagerCommented:
Great!  Your welcome!  I'm glad I could help.  Thanks for the grade, the points and the fun question.

bol
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.