Access 2010 - Cum sa afiseze imagini dintr-ul folder in raport
Scris: Dum Iul 21, 2019 7:34 pm
Salutare,
Vin catre voi cu rugamintea sa ma ajutati cu o idee referitoare la situatia urmatoare: Trebuie sa fac pentru la serviciu o baza de date in access, ce pare simpla dar imi tot da batai de cap.
Aceasta baza de date trebuie sa aiba:
- tbl_produse: id_produs, nume_produs,cod produs
In raport "rp_produse" doresc sa imi apara produsele iar in dreptul lor poza ce este salvata intr-un alt folder cu denumirea=cod_produs;
Am tot cautat pe internet si am gasit urmatorul link: " https://support.microsoft.com/en-us/hel ... data-acces ".
Am creat tabelul, am creat modulul, problema vine la urmatorele, si nu inteleg ce vrea sa zica:
"Open the tblImage table in Datasheet view, and then add the path and name of a bitmap file to each record. The following table of examples shows how the records might look:
--------------------------------------------------------------
| Type | Example |
--------------------------------------------------------------
| Absolute (Local) | C:\Windows\Zapotec.bmp |
| Absolute (UNC Path) | \\Servername\sharename\Zapotec.bmp |
| Relative | Zapotec.bmp |
--------------------------------------------------------------
Using the custom function in a report
Create the following new report that is based on the ImageTable table.
Report: rptImage
----------------------
Caption: Image Report
RecordSource: tblImage
Image Control
---------------------------------
Name: ImageFrame
Picture: "C:\Windows\Zapotec.bmp"
Text box
----------------------
Name: txtImageID
ControlSource: ImageID
Text box
---------------------------
Name: txtImageName
ControlSource: txtImageName
Text box
---------------------------
Name: txtImageNote
ControlSource: <Blank>
NOTE: If you do not want the path to appear in the report, you can set the Visible property of the txtImageName control to False.
On the View menu, click Code, and then paste or type the following code:
Option Compare Database
Option Explicit
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me!txtImageNote = DisplayImage(Me!ImageFrame, Me!txtImageName)
End Sub
Open the rptImage report in print preview. Note that the report displays the corresponding bitmap for each record. If the txtImageName field is blank or if the image cannot be found, you receive appropriate messages instead of the image frame."
Ma puteti ajuta, va rog cu un sfat ?
Va multumesc,
Vin catre voi cu rugamintea sa ma ajutati cu o idee referitoare la situatia urmatoare: Trebuie sa fac pentru la serviciu o baza de date in access, ce pare simpla dar imi tot da batai de cap.
Aceasta baza de date trebuie sa aiba:
- tbl_produse: id_produs, nume_produs,cod produs
In raport "rp_produse" doresc sa imi apara produsele iar in dreptul lor poza ce este salvata intr-un alt folder cu denumirea=cod_produs;
Am tot cautat pe internet si am gasit urmatorul link: " https://support.microsoft.com/en-us/hel ... data-acces ".
Am creat tabelul, am creat modulul, problema vine la urmatorele, si nu inteleg ce vrea sa zica:
"Open the tblImage table in Datasheet view, and then add the path and name of a bitmap file to each record. The following table of examples shows how the records might look:
--------------------------------------------------------------
| Type | Example |
--------------------------------------------------------------
| Absolute (Local) | C:\Windows\Zapotec.bmp |
| Absolute (UNC Path) | \\Servername\sharename\Zapotec.bmp |
| Relative | Zapotec.bmp |
--------------------------------------------------------------
Using the custom function in a report
Create the following new report that is based on the ImageTable table.
Report: rptImage
----------------------
Caption: Image Report
RecordSource: tblImage
Image Control
---------------------------------
Name: ImageFrame
Picture: "C:\Windows\Zapotec.bmp"
Text box
----------------------
Name: txtImageID
ControlSource: ImageID
Text box
---------------------------
Name: txtImageName
ControlSource: txtImageName
Text box
---------------------------
Name: txtImageNote
ControlSource: <Blank>
NOTE: If you do not want the path to appear in the report, you can set the Visible property of the txtImageName control to False.
On the View menu, click Code, and then paste or type the following code:
Option Compare Database
Option Explicit
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me!txtImageNote = DisplayImage(Me!ImageFrame, Me!txtImageName)
End Sub
Open the rptImage report in print preview. Note that the report displays the corresponding bitmap for each record. If the txtImageName field is blank or if the image cannot be found, you receive appropriate messages instead of the image frame."
Ma puteti ajuta, va rog cu un sfat ?
Va multumesc,