1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Set CrxReport = crxApplication.OpenReport(App.Path & "\EtatListRapp.rpt")
CrxReport.DiscardSavedData
Set AdoRs1 = New Recordset
Set AdoRs2 = New Recordset
Set AdoRs3 = New Recordset
Set AdoRs4 = New Recordset
Set AdoRs5 = New Recordset
AdoRs1.Open "Select * from V_ETAT_RAPPORT Where V_ETAT_RAPPORT.CodeRapp = " & mCodeRapport, db, adOpenDynamic, adLockOptimistic
AdoRs2.Open "Select * from V_SOUS_ETAT_BL_RAPPORT Where V_SOUS_ETAT_BL_RAPPORT.CodeRapp = " & mCodeRapport, db, adOpenDynamic, adLockOptimistic
AdoRs3.Open "Select * from V_SOUS_ETAT_ACHATDEPOT_RAPPORT Where V_SOUS_ETAT_ACHATDEPOT_RAPPORT.CodeRapp = " & mCodeRapport, db, adOpenDynamic, adLockOptimistic
AdoRs4.Open "Select * from V_SOUS_ETAT_DEPENSE_RAPPORT Where V_SOUS_ETAT_DEPENSE_RAPPORT.CodeRapp = " & mCodeRapport, db, adOpenDynamic, adLockOptimistic
AdoRs5.Open "Select * from V_SOUS_ETAT_VERSEMENT_RAPPORT Where V_SOUS_ETAT_VERSEMENT_RAPPORT.CodeRapp = " & mCodeRapport, db, adOpenDynamic, adLockOptimistic
CrxReport.Database.Tables(1).SetDataSource AdoRs1, 3
CrxReport.Database.Tables(1).SetDataSource AdoRs2, 3
CrxReport.Database.Tables(1).SetDataSource AdoRs3, 3
CrxReport.Database.Tables(1).SetDataSource AdoRs4, 3
CrxReport.Database.Tables(1).SetDataSource AdoRs5, 3 |
Partager