Active Report Mysql dengan VB6
Private Sub ActiveReport_ReportStart()
Dim strSql As String
Dim TglAwal As String
Dim TglAkhir As String
lblLembagaNama.Caption = UCase(xNamaKantor)
lblLembagaAlamat.Caption = xAlamatKantor
With frmAbsensiLaporan
TglAwal = Format(.dtAwal.Value, "yyyy-mm-dd")
TglAkhir = Format(.dtAkhir.Value, "yyyy-mm-dd")
lblPeriode.Caption = "Periode: " & Format(TglAwal, "dd-mm-yyyy") & " s.d " & Format(TglAkhir, "dd-mm-yyyy")
lblDicetak.Caption = "Dicetak oleh " & frmMain.StatusBar1.Panels(1).Text & _
", Tanggal " & Format(Now, "dd-mm-yyyy") & _
", Jam " & Format(Now, "hh:mm:ss")
strSql = "SELECT absensi_karyawan, karyawan_nama, absensi_tanggal, absensi_date_time, " & _
"GetAbsensiJenis(absensi_jenis) as Jenis, absensi_keterangan " & _
"FROM data_absensi " & _
"LEFT JOIN data_karyawan_master ON karyawan_kode = absensi_karyawan " & _
"WHERE absensi_status = 1 " & _
"AND (absensi_tanggal BETWEEN '" & TglAwal & "' AND '" & TglAkhir & "') " & _
"ORDER BY absensi_date_time ASC"
RunSQL strSql
End With
End Sub
Private Sub ActiveReport_FetchData(EOF As Boolean)
On Error Resume Next
If rsNew.EOF = True Then Exit Sub
EOF = False
Screen.MousePointer = 13
lblNo.Caption = Val(lblNo.Caption) + 1
lblTanggal.Caption = Format(rsNew.Fields("absensi_tanggal"), "dd-mm-yyyy")
lblNama.Caption = rsNew.Fields("karyawan_nama")
lblKode.Caption = rsNew.Fields("absensi_karyawan")
lblKeterangan.Caption = rsNew.Fields("absensi_keterangan")
lblJenis.Caption = rsNew.Fields("jenis")
lblWaktu.Caption = Format(rsNew.Fields("absensi_date_time"), "hh:mm:ss")
lblTotal.Caption = lblNo.Caption
rsNew.MoveNext
Screen.MousePointer = 0
End Sub
Langganan:
Posting Komentar (Atom)
0 comments:
Posting Komentar