Public Sub PrintReport(ByVal pstrReportFile As String, _ Optional ByVal pbytDestination As Byte = 0) Static sbytNbDataFile As Byte Dim bytI As Byte Dim intResult As Integer With fMainForm.CrystalReport1 .WindowState = crptMaximized .ReportFileName = App.path & "\" & pstrReportFile .Destination = pbytDestination .WindowTitle = App.Title 'Lance l'impression intResult = .PrintReport If intResult <> 0 Then MsgBox "Error occured." & _ vbCrLf & .LastErrorNumber & ": " & .LastErrorString, _ vbCritical + vbOKOnly, _ "Error" End If End With End Sub