Ver Mensaje Individual
  #3 (permalink)  
Antiguo 31/03/2008, 09:27
MaximoAntonio2004
 
Fecha de Ingreso: marzo-2008
Mensajes: 9
Antigüedad: 17 años, 1 mes
Puntos: 0
Re: Imprimir registro actual.

1.- Primero deberas de Crear un Reporte con el DataReport
2.-por codigo deberas mandarle los valores al reporte...esta es una forma pero existen otrtas formas mas sencillas

este es el codigo:

Set RptKardex.DataSource = rsKardex
With RptKardex
.Sections("CAB").Controls("lblusuario").Caption = Gsuc & " - " & GUsuario
.Sections("cab").Controls("lblempresa").Caption = Gempresa
.Sections("cab").Controls("lblCodArt").Caption = txtcodart.Text

.Sections("DET").Controls("txtF").DataField = rsKardex.Fields("fecha").Name
.Sections("DET").Controls("txtN").DataField = rsKardex.Fields("sucursalXCliente").Name
.Sections("DET").Controls("txtA").DataField = rsKardex.Fields("articulos").Name
.Sections("DET").Controls("txtC1").DataField = rsKardex.Fields("cantidad").Name
.Sections("DET").Controls("txtP1").DataField = rsKardex.Fields("piezas").Name
.Sections("DET").Controls("txtC2").DataField = rsKardex.Fields("cantida").Name
.Sections("DET").Controls("txtP2").DataField = rsKardex.Fields("pieza").Name
.Sections("DET").Controls("txtS").DataField = rsKardex.Fields("stock").Name
.Sections("DET").Controls("txtp").DataField = rsKardex.Fields("sp").Name

.Sections("PIE").Controls("lblTC1").Caption = tc1
.Sections("PIE").Controls("lblTP1").Caption = tp1
.Sections("PIE").Controls("lblTC2").Caption = tc2
.Sections("PIE").Controls("lblTp2").Caption = tp2

.Show vbModal
'.PrintReport False, rptRangeAllPages
End With