|
-
Aug 6th, 2002, 06:25 PM
#1
Thread Starter
New Member
diferent images paths on a datareport
i need to print some kind of ID Cards with diferents images (photos) on them, i'm using this code, but the same image is displayed on every record:
Dim rs As ADODB.Recordset
Set conn = New ADODB.Connection
conn.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & RutaBaseDatos & ";" & _
"Persist Security Info=False"
conn.Open
' Open the Recordset.
Set rs = conn.Execute("select * from alumnos", , adCmdText)
' Connect the Recordset to the DataReport.
Set DataReport1.DataSource = rs
Foto = rs.Fields("NControl")
Set DataReport1.Sections("Detalle").Controls("Foto").Picture = LoadPicture(RutaFotos & Foto & ".bmp")
DataReport1.WindowState = vbMaximized
DataReport1.Show vbModal
rs.Close
conn.Close
any idea how to put diferent images, using paths.
-
Aug 6th, 2002, 06:54 PM
#2
Fanatic Member
Hi
It is logical that you get always the same image.
You send one time the RutaFotos & Foto to your DataReport. Where you update it? What is RutaFoto? Is it a Variable? There is for sure the problem. It seems to me a logical problem. How you saved the Images?
I do this way:
I create in my Table a field with the filename of the Img. Then I just connect always on runtime to the correct image.
If you have more problems then attach the zipped code here.
Franky
-
Aug 6th, 2002, 07:15 PM
#3
Thread Starter
New Member
-
Aug 6th, 2002, 07:16 PM
#4
Fanatic Member
Hi
For your simple problem it is maybe not nec. to use Crystal reports. I am even not sure for what you need the report itself. I create the most reports manually, specially when there are pictures in it.
Franky
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|