Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/03/2004, 11:30
Avatar de GeoAvila
GeoAvila
Colaborador
 
Fecha de Ingreso: diciembre-2003
Ubicación: Antigua Guatemala
Mensajes: 4.032
Antigüedad: 20 años, 5 meses
Puntos: 53
Claro que se puede con un ciclo
Bueno esto es una Demo de como podría quedar
ListadoPado es la grilla
Es un tango EXtenso pero funciona..

nos vemos



Private Sub CmdPaqueteAceptar_Click()
Dim GridZise As Integer
Dim Ciclos As Integer
Dim InicioY As Integer
InicioY = 2300
GridZise = 10675
Printer.PaperSize = vbPRPSA4
Printer.FontSize = 6
'%%% Encabezado
'Definicion
Printer.CurrentX = 6742
Printer.CurrentY = 100
Printer.Print "Cargos de Hospedaje"
Printer.FontSize = 9
'propietario
Printer.CurrentX = 6742
Printer.CurrentY = 600
Printer.Print Me.LblPropietario.Caption
' tipo de hospedaje
Printer.CurrentX = 6742
Printer.CurrentY = 1100
Printer.Print Me.LblHospedaje.Caption

' tipo de Telefono
Printer.CurrentX = 6742
Printer.CurrentY = 1600
Printer.Print Me.Lbltelefono.Caption
' tipo de Dirección
Printer.CurrentX = 2500
Printer.CurrentY = 1600
Printer.Print Me.LblDireccion.Caption

' tipo de Fecha
Printer.CurrentX = 9665
Printer.CurrentY = 1600
Printer.Print Me.LblFecha.Caption
'%%% Fin Encabezado
'Detalle del Docuemento
'Numero de Ciclos que definirá las filas que llevará el documento
For Ciclos = 1 To (Me.ListadoPago.Rows - 1)

'primera columna
Printer.CurrentX = 550
Printer.CurrentY = InicioY
Printer.Print Me.ListadoPago.TextMatrix(Ciclos, 1)

'segunda columna
Printer.CurrentX = 1439
Printer.CurrentY = InicioY
Printer.Print Me.ListadoPago.TextMatrix(Ciclos, 2)

'tercera columna
Printer.CurrentX = 3574
Printer.CurrentY = InicioY
Printer.Print Me.ListadoPago.TextMatrix(Ciclos, 3)

'Cuarta Columna
Printer.CurrentX = 4463
Printer.CurrentY = InicioY
Printer.Print Me.ListadoPago.TextMatrix(Ciclos, 4)
'Quinta Columna
Printer.CurrentX = 6742
Printer.CurrentY = InicioY
Printer.Print Me.ListadoPago.TextMatrix(Ciclos, 5)
'Sexta Columna
Printer.CurrentX = 8176
Printer.CurrentY = InicioY
Printer.Print Me.ListadoPago.TextMatrix(Ciclos, 6)
'Septima Columna
Printer.CurrentX = 9665
Printer.CurrentY = InicioY
Printer.Print Me.ListadoPago.TextMatrix(Ciclos, 7)
'octava Columna
Printer.CurrentX = 10655
Printer.CurrentY = InicioY
Printer.Print Format$(Me.ListadoPago.TextMatrix(Ciclos, 8), "$ ###,#00.00")

' Da la altura de cada fila, y aumenta 250 para la siguiente fila
InicioY = InicioY + 250
'Los Ciclos
Next Ciclos
'Fin de detalle de docuemento
'imprime el documento
Printer.EndDoc
__________________
* Antes de preguntar lee las FAQ, y por favor no hagas preguntas en las FAQ
Sitio http://www.geoavila.com twitter: @GeoAvila