1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
Public Sub editer(ByVal nomChemin As String, ByVal unForm As Form, ByVal uneTable As String, ByVal interv As Boolean)
Dim rptReport As New CRAXDRT.Report
Dim rptRepApp As New CRAXDRT.Application
Dim rtpViews As CRAXDRT.DatabaseTable
Dim rstControle As New ADODB.Recordset
rstControle.Open "select * from ED_CONTROLE", gConserver
If rstControle("CONTROLE") = 1 Then
Set rptRepApp = New CRAXDRT.Application
Set rptReport = New CRAXDRT.Report
With unForm.apercu
Set rptReport = rptRepApp.OpenReport(App.Path & "\Etats\" & nomChemin, 1)
.ReportSource = rptReport
.ViewReport
End With
rptReport.Database.AddOLEDBSource sChaineConnexion, uneTable
If interv = True Then
rptReport.Database.AddOLEDBSource sChaineConnexion, "ED_INTERVENANT"
End If
unForm.Top = 0
unForm.Left = 0
unForm.Width = Screen.Width - 850
unForm.Height = Screen.Height - 1200
unForm.apercu.Top = 0
unForm.apercu.Left = 0
unForm.apercu.Width = unForm.Width
unForm.apercu.Height = unForm.Height
unForm.apercu.EnableGroupTree = False
rptReport.DiscardSavedData
End If
End Sub |
Partager