You have 1 or 2 problems with your loop.
Dim lbl(5) As Label
This declares you plan to make an array of labels, but you never initialize it. When I try to run your code (w/o dgv) it crashes because there is nothing in lbl(x) ('Object reference not set to an instance of an object.'). There is no reason to stash the labels in an array if they are going to be added to a form. So, just create labels as you need them:
For Each col As DataGridViewColumn In Main.DataGridView1.Columns
i = row.Index
j = col.Index
Dim lbl As New Label ' make a new label
With lbl
.AutoSize = True
.BackColor = System.Drawing.SystemColors.Control
.Font = New Font(lbl(x).Font.FontFamily, 8.45, FontStyle.Regular)
.ForeColor = System.Drawing.SystemColors.ControlText
' the above props are being set to default values, so arent really needed
.Location = New System.Drawing.Point(i * 111 + 6, (i + 1) * 24 + 16)
' I think this needs to be changed:
.Text = Main.DataGridView1.Rows(i).Cells(j).Value.ToString
End With
MsgBox(lbl(x).Text)
GroupBoxInvoiceInvoice.Controls.Add(lbl)
x += 1
Next
This worked fine without the dgv reference, so if the labels are still blank, check to make sure there is something in those cells to display. If that loop was executing all the way something somewhere was eating the exception and could be eating another.
-------------------- EDIT ----------------------------
The problem is using row.index and col.index as for i,j. Those have to do with databands and return 0 otherwise. You want to loop thru the CELLS for each row:
For Each row As DataGridViewRow In dgv.Rows
If row.IsNewRow = False Then
' loop thru cells in row
For c As Integer = 0 To rrow.Cells.Count - 1
Dim lbl As New Label
With lbl
.AutoSize = True
.BackColor = System.Drawing.SystemColors.Control
.BorderStyle = BorderStyle.Fixed3D
.ForeColor = System.Drawing.SystemColors.ControlText
.Location = New System.Drawing.Point(r + 5, c * 22) ' FIX
' CONVERT value TO STRING!!!
.Text = rrow.Cells(c).Value.ToString
End With
Panel1.Controls.Add(lbl)
' prints as many time as there are labels/cells
Console.WriteLine("label {0}", rrow.Cells(c).Value.ToString)
Next
End If
Next
Console.WriteLine("{0}", Panel1.Controls.Count) ' my locations are foobar
' but the right number are there.
You will want to add r,c (or i, j) counters for positioning the labels on the form, but otherwise, all is well in LabelLand...of should be