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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
| Private Sub Combo1_Click() ' choisis le projet
Set ITEMS_CHOIX = New ADODB.Recordset
Set ITEMS = New ADODB.Recordset
Set ENTETE = New ADODB.Recordset
Set VENDU = New ADODB.Recordset
Set LIVRE = New ADODB.Recordset
Set Test = New ADODB.Recordset
Set TRANS = New ADODB.Recordset
'******** .
'******** .
ENTETE.Open "select * from JOB where JOB.NO_JOB = '" & Combo1.Text & "'", CONN
If ENTETE.BOF = False Then
TROUVER = "OUI"
JOB_INFO = ENTETE.GetRows
If JOB_INFO(8, 0) <> "" Then Text1.Text = JOB_INFO(8, 0)
If JOB_INFO(5, 0) <> "" Then DTPicker1.Value = JOB_INFO(5, 0)
If JOB_INFO(6, 0) <> "" Then DTPicker2.Value = JOB_INFO(6, 0)
If JOB_INFO(9, 0) <> "" Then Combo4.Text = JOB_INFO(9, 0)
If JOB_INFO(11, 0) <> "" Then Combo2.Text = JOB_INFO(11, 0)
If JOB_INFO(7, 0) <> "" Then Combo3.Text = JOB_INFO(7, 0)
' If JOB_INFO(7, 0) <> "" Then Text7.Text = JOB_INFO(7, 0)
If JOB_INFO(3, 0) <> "" Then DTPicker3.Value = JOB_INFO(3, 0)
If JOB_INFO(4, 0) <> "" Then DTPicker4.Value = JOB_INFO(4, 0)
If JOB_INFO(12, 0) <> "" Then Text2.Text = JOB_INFO(12, 0)
Else
TROUVER = "NON"
End If
'*************************************************
'***End If.
'***.
'*************************************************
End Sub
Private Sub Command5_Click() ' demande le rapport
SORTE = "PROPOSITION"
RAP
End Sub
Sub RAP()
Set VENDEUR = New ADODB.Recordset
If VENDEUR.State = 1 Then VENDEUR.Close
VENDEUR.Open "select * from EMPLOYER where EMPLOYER.NOM = '" & MAIN.Combo3.Text & "'", CONN
SELL_RAPPORT.Show
Dim crystal As CRAXDRT.Application 'LOADS REPORT FROM FILE
'Dim REPORT As CRAXDRT.REPORT 'HOLDS REPORT
'*************************************************
'***SELL_RAPPORT.CRViewer.DisplayBorder = False SELL_RAPPORT.CRViewer.DisplayTabs = False SELL_RAPPORT.CRViewer.EnableDrillDown = False SELL_RAPPORT.CRViewer.EnableRefreshButton = False
'*************************************************
SELL_RAPPORT.CRViewer.DisplayBorder = False
SELL_RAPPORT.CRViewer.DisplayTabs = False
SELL_RAPPORT.CRViewer.EnableDrillDown = False
SELL_RAPPORT.CRViewer.EnableRefreshButton = False
Set crystal = New CRAXDRT.Application
Select Case SORTE
Case "PROPOSITION"
'*************************************************
'***Set REPORT = crystal.OpenReport App.Path "\B_PROPOSITION.rpt") REPORT.Database.Tables(4).SetDataSource ITEMS
'*************************************************
Set REPORT = crystal.OpenReport(App.Path & "\B_PROPOSITION.rpt")
REPORT.Database.Tables(4).SetDataSource ITEMS
Case "BON_TRAVAIL"
'*************************************************
'***Set REPORT = crystal.OpenReport(App.Path & "\B_BON_TRAVAIL.rpt") REPORT.Database.Tables(4).SetDataSource ITEMS_CHOIX
'*************************************************
Set REPORT = crystal.OpenReport(App.Path & "\B_BON_TRAVAIL.rpt")
REPORT.Database.Tables(4).SetDataSource ITEMS_CHOIX
Case "BON_LIVRAISON"
'*************************************************
'***Set REPORT = crystal.OpenReport(App.Path & "\B_BON_LIVRAISON.rpt") REPORT.Database.Tables(4).SetDataSource ITEMS_CHOIX
'*************************************************
Set REPORT = crystal.OpenReport(App.Path & "\B_BON_LIVRAISON.rpt")
REPORT.Database.Tables(4).SetDataSource ITEMS_CHOIX
Case "FACTURE"
'*************************************************
'***Set REPORT = crystal.OpenReport(App.Path & "\B_FACTURE.rpt") REPORT.Database.Tables(4).SetDataSource ITEMS_CHOIX
'*************************************************
Set REPORT = crystal.OpenReport(App.Path & "\B_FACTURE.rpt")
REPORT.Database.Tables(4).SetDataSource ITEMS_CHOIX
End Select
REPORT.PaperSize = crPaperLetter
REPORT.DiscardSavedData
REPORT.Database.Tables(1).SetDataSource ENTETE
REPORT.Database.Tables(2).SetDataSource LIVRE
REPORT.Database.Tables(3).SetDataSource VENDU
REPORT.Database.Tables(5).SetDataSource TRANS
REPORT.Database.Tables(6).SetDataSource VENDEUR
SELL_RAPPORT.CRViewer.ReportSource = REPORT
SELL_RAPPORT.CRViewer.ViewReport
Do While SELL_RAPPORT.CRViewer.IsBusy
DoEvents
Loop
SELL_RAPPORT.CRViewer.Zoom (2) '94
End Sub |
Partager