m2rtech
Messages postés239Date d'inscriptionmercredi 9 octobre 2002StatutMembreDernière intervention20 février 2012
-
19 oct. 2005 à 16:22
m2rtech
Messages postés239Date d'inscriptionmercredi 9 octobre 2002StatutMembreDernière intervention20 février 2012
-
18 mai 2012 à 19:10
Salut,
Je souhaite charger dans Crystal Report 8.5 une image quelconque (ex .Logo.jpg)
Si cette image venait à changer, bien sur Crystal chargerait la
dernière version. Or ce dernier enregistre les images en "Dur" dans les
fichiers RPT.
m2rtech
Messages postés239Date d'inscriptionmercredi 9 octobre 2002StatutMembreDernière intervention20 février 2012 18 mai 2012 à 19:10
Dim Appl As New Application
Dim WithEvents CrSecPH As Section 'dim them with events so we can access the format event
Dim WithEvents CrSecPF As Section 'dim them with events so we can access the format event
Dim CrSecs As Sections
Public Pic1 As OLEObject 'Dim an object for the ole pictures so we can change the pic
Dim Image_Trouvé As Boolean
'
Private Sub CrSecPH_Format(ByVal pFormattingInfo As Object)
On Error GoTo fin
If Chargement_Entete_page = False Then Exit Sub
If Image_Trouvé = True Then
Image1.Picture = LoadPicture(Chemin & Nom_Logo)
Set Pic1.FormattedPicture = LoadPicture(Chemin & Nom_Logo)
Pic1.Width = Image1.Width
Pic1.Height = Image1.Height
End If
Exit Sub
fin:
MsgBox Err.Description
End Sub
'
Private Sub Form_Load()
On Error GoTo fin
Screen.MousePointer = 0
Set CrSecPH = RpT.Sections("PH") ' set this section object to the page header
For i = 1 To CrSecPH.ReportObjects.Count 'Loop through the report objects and see if they are pictures
If CrSecPH.ReportObjects(i).Kind = crOleObject Then ' if it is a CrOleObject then
Set Pic1 = CrSecPH.ReportObjects(i) 'Set the pic1 object to the Ole Report object
Image_Trouvé = True
End If
Next i
Exit Sub
fin:
msgbox err.description
End Sub