Sie sind auf Seite 1von 8

titulos = " Codigo.

|Descripcin|Color|talle|Precio"
MSHFlexGrid1.Clear
With MSHFlexGrid1
.Rows = 2
.FixedRows = 1
.Col = 0
.ColSel = 0
.Row = 1
.RowSel = 1
.FormatString = titulos
.Visible = True
.AllowBigSelection = True
.AllowUserResizing = flexResizeColumns
.SelectionMode = flexSelectionByRow
End With
titulos2 = " Codigo.|Descripcin|Color|talle|Cantidad"

With MSHFlexGrid2
.Clear
.Rows = 2
.FixedRows = 1
.Col = 0
.ColSel = 0
.Row = 1
.RowSel = 1
.FormatString = titulos2
.Visible = True
.AllowBigSelection = True
.AllowUserResizing = flexResizeColumns
.SelectionMode = flexSelectionByRow
End With
End Sub
Private Sub ImprimirBarcodes()
Dim Xpos As Double
Dim Ypos As Double
Dim HSpc As Double
Dim VSpc As Double
Dim AltoHoja As Double
Dim AnchoHoja As Double
AbrirBase
strSql = "Select * From Cordenadas"
rs.Open strSql, DB, adOpenKeyset, adLockOptimistic
If Not rs.EOF Then
Xpos = rs!posX
Ypos = rs!posY
HSpc = rs!EspacioH
VSpc = rs!EspacioV
AltoHoja = rs!AltoHoja
AnchoHoja = rs!AnchoHoja
End If
rs.Close
Set rs = Nothing
Picture1.ScaleMode = vbCentimeters
Printer.Copies = 1
Printer.ScaleMode = vbCentimeters
Printer.CurrentX = Xpos
Printer.CurrentY = Ypos
strSql = "SELECT * FROM BARCODES"
rs.Open strSql, DB, adOpenKeyset, adLockOptimistic
While Not rs.EOF
Picture1.Cls
Picture1.ScaleMode = 3
Picture1.Height = Picture1.Height * (2.4 * 40 / Picture1.ScaleHeight)
Picture1.FontSize = 8
Call DrawBarcode(rs!id, Picture1, rs!Marca & " - " & rs!Talle)
For i = 1 To rs!Cantidad
If Printer.CurrentX <= AnchoHoja Then
Printer.PaintPicture Picture1, Printer.CurrentX, Printer.CurrentY
Printer.CurrentX = Printer.CurrentX + HSpc
Else
Printer.CurrentX = Xpos
Printer.CurrentY = Printer.CurrentY + VSpc
Printer.PaintPicture Picture1, Printer.CurrentX, Printer.CurrentY
Printer.CurrentX = Printer.CurrentX + HSpc
If Printer.CurrentY >= AltoHoja And Printer.CurrentX >= AnchoHoja Then
Printer.NewPage
Printer.CurrentX = Xpos
Printer.CurrentY = Ypos
End If


End If
If Printer.CurrentY >= AltoHoja And Printer.CurrentX >= AnchoHoja Then
Printer.NewPage
Printer.CurrentX = Xpos
Printer.CurrentY = Ypos
End If
Next
rs.MoveNext
Wend
CerrarBase
Printer.EndDoc
End Sub
Private Sub ImprimirFicha()
AbrirBase
Titulo = "Detalle de " & txtDescripcion
'Imprime el Template de la hoja
Printer.ScaleMode = vbCentimeters
Printer.PaperSize = 9
Printer.Orientation = 1
Printer.FontName = "ARIAL"
Printer.DrawStyle = 0
Printer.Font.Size = 14
'Printer.CurrentX = 1
'Printer.CurrentY = 1
'Printer.Print "DYVCOM S.R.L."
Printer.PaintPicture frmLogo.Picture1.Picture, 1, 1
Printer.Font.Size = 8
Printer.CurrentX = 18.8
Printer.CurrentY = 1
Printer.Print "Pgina " & Printer.Page
Printer.CurrentX = 18.5
Printer.CurrentY = 1.5
Printer.Print Date '& " " & Format(Time, "hh:nn am/pm")
Printer.CurrentX = 1
Printer.CurrentY = 2
'Printer.Print "TEL:4744-4416 - E-mail: dyvcom@hotmail.com"
Printer.Font.Size = 14
x = 21 / 2
Printer.CurrentX = x - (Printer.TextWidth(Titulo)) + (Printer.TextWidth(Titulo))
/ 2
Printer.CurrentY = 3
Printer.Print Titulo
Printer.Line (1, 4)-(20, 4)
Printer.Font.Size = 12
Printer.CurrentX = 2
Printer.CurrentY = 4
Printer.Print "Codigo de Artculo = " & txtID
Printer.CurrentX = 2
Printer.CurrentY = Printer.CurrentY + 1
Printer.Print "Fecha de Alta = " & dtp1
Printer.CurrentX = 2
Printer.CurrentY = Printer.CurrentY + 1
Printer.Print "Descripcin = " & txtDescripcion
Printer.CurrentX = 2
Printer.CurrentY = Printer.CurrentY + 1
Printer.Print "MARCA = " & txtMarca
Printer.CurrentX = 2
Printer.CurrentY = Printer.CurrentY + 1
Printer.Print "Talle = " & txtTalle
Printer.CurrentX = 2
Printer.CurrentY = Printer.CurrentY + 1
Printer.Print "Precio Unitario = " & txtPrecio
Printer.CurrentX = 2
Printer.CurrentY = Printer.CurrentY + 1
Printer.Print "Precio x 12 = " & txtPrecioProv
Printer.CurrentX = 2
Printer.CurrentY = Printer.CurrentY + 1
Printer.Print "Existencias = " & txtExistencias
Printer.CurrentX = 2
Printer.CurrentY = Printer.CurrentY + 1
Printer.Print "Stock Mnimo = " & txtStockMinimo
Printer.Line (1, (Printer.CurrentY + 1))-(20, (Printer.CurrentY + 1))
Printer.EndDoc
CerrarBase
End Sub
Private Sub ImpTitulosINV()
Titulo = "Control de Inventario"
'Imprime el Template de la hoja
Printer.ScaleMode = vbCentimeters
Printer.PaperSize = 9
Printer.Orientation = 1
Printer.FontName = "ARIAL"
Printer.DrawStyle = 0
Printer.Font.Size = 14
'Printer.CurrentX = 1
'Printer.CurrentY = 1
'Printer.Print "DYVCOM S.R.L."
Printer.PaintPicture frmLogo.Picture1.Picture, 1, 1
Printer.Font.Size = 8
Printer.CurrentX = 18.8
Printer.CurrentY = 1
Printer.Print "Pgina " & Printer.Page
Printer.CurrentX = 18.5
Printer.CurrentY = 1.5
Printer.Print Date '& " " & Format(Time, "hh:nn am/pm")
Printer.CurrentX = 1
Printer.CurrentY = 2
'Printer.Print "TEL:4744-4416 - E-mail: dyvcom@hotmail.com"
Printer.Font.Size = 14
x = 21 / 2
Printer.CurrentX = x - (Printer.TextWidth(Titulo)) + (Printer.TextWidth(Titulo))
/ 2
Printer.CurrentY = 3
Printer.Print Titulo
Printer.Font.Size = 8
'LINEAS HORIZONTALES
Printer.Line (1, 3.9)-(20, 3.9)
Printer.Line (1, 29)-(20, 29)
'LINEAS VERTICALES
Printer.Line (1, 3.9)-(1, 29)
'Aqui codigo
Printer.Line (2, 3.9)-(2, 29)
'Aqui Descripcion
Printer.Line (9, 3.9)-(9, 29)
'Aqui colores
Printer.Line (13, 3.9)-(13, 29)
'Aqui Talles
Printer.Line (16, 3.9)-(16, 29)
'Aqui p.unit
Printer.Line (18, 3.9)-(18, 29)
'Aqui p. docena
Printer.Line (20, 3.9)-(20, 29)
' TITULO DE LOS CAMPOS
Printer.CurrentY = 4
Printer.CurrentX = 1.2
Printer.Print "ART.";
Printer.CurrentX = 4.2
Printer.Print "DESCRIPCIN";
Printer.CurrentX = 10.2
Printer.Print "Color";
Printer.CurrentX = 13.9
Printer.Print "TALLES";
'
'Printer.CurrentX = 16.5
'Printer.Print "P/UNIT";
'
Printer.CurrentX = 18.3
Printer.Print "Existencias"
'Printer.CurrentX = 14
'Printer.Print "TotalVenta";
'Printer.CurrentX = 17.5
'Printer.Print "Costo.M.";
'Printer.CurrentX = 19.2
'Printer.Print "Utilidad"

Printer.Line (1, (Printer.CurrentY + espacioCelda))-(20, (Printer.CurrentY + esp
acioCelda))
End Sub
Private Sub showMaster()
Dim res As Recordset
Dim rflag As Boolean
Dim m As ListItem
'values for counting
Dim countF As Integer
Dim countcs As Integer
Dim countIT As Integer
Dim countDCET As Integer
Dim countDEP As Integer
Dim countNUR As Integer
Dim countCCT As Integer
Dim countHRM As Integer
Dim countCoE As Integer
Dim countOTher As Integer
Set res = New Recordset
Set Cmaster = New clsMaster
rflag = Cmaster.getAllList(res)
If rflag Then
Do While Not (res.EOF Or res.BOF)
Set m = Me.listStudents.ListItems.Add(, , res.Fields("Studentno"))
m.SubItems(1) = res.Fields("Lname")
m.SubItems(2) = res.Fields("Fname")
m.SubItems(3) = res.Fields("MI")
m.SubItems(4) = res.Fields("Sex")
m.SubItems(5) = res.Fields("Address")
m.SubItems(6) = res.Fields("Contactno")
m.SubItems(7) = res.Fields("School")
m.SubItems(8) = res.Fields("Course")


If res.Fields("sex") = "F" Then
countF = countF + 1
End If

If res.Fields("Course") = "BSCS" Then
countcs = countcs + 1
End If

If res.Fields("Course") = "BSIT" Then
countIT = countIT + 1
End If

If res.Fields("Course") = "DEP" Then
countDEP = countDEP + 1
End If

If res.Fields("Course") = "BSN" Then
countNUR = countNUR + 1
End If

If res.Fields("Course") = "DCET" Then
countDCET = countDCET + 1
End If

If res.Fields("Course") = "CCT" Then
countCCT = countCCT + 1
End If

If res.Fields("Course") = "HRM" Then
countHRM = countHRM + 1
End If

If res.Fields("Course") = "CoE" Then
countCoE = countCoE + 1
End If

If res.Fields("Course") = "-" Then
countOTher = countOTher + 1
End If



res.MoveNext
Loop
End If
'display counts
Me.lblTS.Caption = Me.listStudents.ListItems.Count
Me.lblF.Caption = countF
Me.lblM.Caption = Me.lblTS - countF
Me.lblCS.Caption = countcs
Me.lblIT.Caption = countIT
Me.lblDEP.Caption = countDEP
Me.lblDCET.Caption = countDCET
Me.lblBSN.Caption = countNUR
Me.lblCCT.Caption = countCCT
Me.lblHRM.Caption = countHRM
Me.lblCoe.Caption = countCoE
Me.lblOther.Caption = countOTher
End Sub

Das könnte Ihnen auch gefallen