
14/06/2009, 21:41
|
| | Fecha de Ingreso: junio-2009
Mensajes: 2
Antigüedad: 15 años, 8 meses Puntos: 0 | |
Respuesta: ayuda con impresion en vb.net pues hace algo de tiempo intente algo similar pero no me hacia el salto, me generaba una segunda pagina en blanco y me seguia escribiendo sobre la primera.
Código:
ev.Graphics.DrawString("__________________________________________________________________________________________________________", New Font("calibri", 10, FontStyle.Bold), Brushes.Black, 50, ypos)
ypos += lineHeight
ev.Graphics.DrawString("PADECIMIENTO ACTUAL POR PROBLEMAS", New Font("calibri", 15, FontStyle.Bold), Brushes.Black, 235, ypos)
ypos += lineHeight
ev.Graphics.DrawString("__________________________________________________________________________________________________________", New Font("calibri", 10, FontStyle.Bold), Brushes.Black, 50, ypos)
ypos += lineHeight
nuevo += 3
While indiceproblemas < contproblemas
If seleccionador = 1 Then
If cargarproblemas(indiceproblemas, 0) <> "" Then
ev.Graphics.DrawString("P " & contador & ": " & cargarproblemas(indiceproblemas, 0) & "", prfont, Brushes.Black, 70, ypos)
ypos += lineHeight
ypos += lineHeight
ypos += lineHeight
nuevo += 3
End If
End If
If seleccionador = 2 Then
If cargarproblemas(indiceproblemas, 1) <> "" Then
ev.Graphics.DrawString("S: " & cargarproblemas(indiceproblemas, 1) & "", prfont, Brushes.Black, 80, ypos)
ypos += lineHeight
ypos += lineHeight
ypos += lineHeight
nuevo += 3
End If
End If
If seleccionador = 3 Then
If cargarproblemas(indiceproblemas, 2) <> "" Then
ev.Graphics.DrawString("O: " & cargarproblemas(indiceproblemas, 2) & "", prfont, Brushes.Black, 80, ypos)
ypos += lineHeight
ypos += lineHeight
ypos += lineHeight
nuevo += 3
End If
End If
If seleccionador = 4 Then
If cargarproblemas(indiceproblemas, 3) <> "" Then
ev.Graphics.DrawString("A: " & cargarproblemas(indiceproblemas, 3) & "", prfont, Brushes.Black, 80, ypos)
ypos += lineHeight
ypos += lineHeight
ypos += lineHeight
nuevo += 3
End If
End If
If seleccionador = 5 Then
If cargarproblemas(indiceproblemas, 4) <> "" Then
ev.Graphics.DrawString("P: " & cargarproblemas(indiceproblemas, 4) & "", prfont, Brushes.Black, 80, ypos)
ypos += lineHeight
ypos += lineHeight
ypos += lineHeight
ypos += lineHeight
nuevo += 3
seleccionador = 0
indiceproblemas += 1
contador += 1
Else
seleccionador = 0
indiceproblemas += 1
contador += 1
End If
End If
If nuevo > 48 Then
ev.HasMorePages = true
nuevo = 0
Else
ev.HasMorePages = false
End If
seleccionador += 1
End While
tambien lo intente sacando el if del while, pero sucedia lo mismo |