I need simple help I'm doing a simple report with PrintDocument
, but I'm having a hard time making it look at several pages. According to the record that is displayed in my datagrid
.
Any idea that might be useful in this process of my code?
I need you to show me the result of a record according to the history, in the case of the employee. It is only showing one page and the information is incomplete. I can not implement this stage in the code I have.
For Each dr As DataGridViewRow In dgvRegistros.Rows
'CODIGO
e.Graphics.DrawString("Nº REG.", New Font("Calibri", 10, FontStyle.Bold), Brushes.Black, 70, 270)
e.Graphics.DrawString(dr.Cells(0).Value, New Font("Calibri", 10), Brushes.Black, 90, y)
'TIPO
e.Graphics.DrawString("TIPO", New Font("Calibri", 10, FontStyle.Bold), Brushes.Black, 120, 270)
e.Graphics.DrawString(dr.Cells(3).Value, New Font("Calibri", 10), Brushes.Black, 120, y)
'JUSTIFICATIVA
e.Graphics.DrawString("JUSTIFICATIVA", New Font("Calibri", 10, FontStyle.Bold), Brushes.Black, 250, 270)
e.Graphics.DrawString(dr.Cells(6).Value, New Font("Calibri", 10), Brushes.Black, 250, y)
'DATA
e.Graphics.DrawString("DATA", New Font("Calibri", 10, FontStyle.Bold), Brushes.Black, 660, 270)
e.Graphics.DrawString(dr.Cells(4).Value, New Font("Calibri", 10), Brushes.Black, 660, y)
'HORA
e.Graphics.DrawString("HORA", New Font("Calibri", 10, FontStyle.Bold), Brushes.Black, 750, 270)
e.Graphics.DrawString(dr.Cells(5).Value, New Font("Calibri", 10), Brushes.Black, 750, y)
y += 20
'LINHA
e.Graphics.DrawLine(New Pen(Color.Black, 1), 25, 290, 800, 290)
Next