Visual Basic - IMPRIMIR DBGrid

Life is soft - evento anual de software empresarial
 
Vista:

RE:IMPRIMIR DBGrid

Publicado por miguel (1042 intervenciones) el 14/07/2004 03:31:40
En este caso utilizo el control data por lo tanto:
IncreaseY = 0
For i = 1 To Data1.Recordset.RecordCount
R = R + 1 'row number by increase one with every loop
IncreaseY = IncreaseY + 5 'increaseY by 5 with every loop
'
On Error Resume Next
DBGrid1.Row = R 'identify row number to print

Printer.CurrentX = 10 'declare same position of X
Printer.CurrentY = 10 + IncreaseY 'declare position of Y
DBGrid1.Col = 0 'identify column number to print
Printer.Print DBGrid1.Text
'
DBGrid1.Col = 1 'identify column number to print
Printer.CurrentX = 20 'declare new position of Y
Printer.CurrentY = 10 + IncreaseY 'declare position of Y
Printer.Print DBGrid1.Text
'
DBGrid1.Col = 2 'identify column number to print
Printer.CurrentX = 70 'declare new position of Y
Printer.CurrentY = 10 + IncreaseY 'declare position of Y
Printer.Print DBGrid1.Text
Data1.Recordset.MoveNext
Next
Te mando un ejemplo a tu correo...saludos.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar