You can use a 'For' loop to iterate from 1 to the value of 'numLabels' (which is 5 in this case). I have no idea what box you are speaking of, I named it 'PrintBox' -
' Assuming you have a variable named 'PrintBox' with the value 5, if not replace this with whatever 'box' is...
' Calculate the number of labels to print based on the value of PrintBox
Dim numLabels As Integer = 5
For i As Integer = 1 To numLabels
' Create a new printjob of the label for each label
Dim dsReport As label_DataSet = GetData_SP()
' Set the value of the PrintBox for the current label
dsReport.Tables(1).Rows(0)("PrintBox") = i
' Set up the report viewer for the current label
ReportViewer1.ProcessingMode = ProcessingMode.Local
ReportViewer1.LocalReport.ReportPath = Server.MapPath("lbl_Print.rdlc")
Dim datasource As New ReportDataSource("DataSet1", dsReport.Tables(1))
ReportViewer1.LocalReport.DataSources.Clear()
ReportViewer1.LocalReport.DataSources.Add(datasource)
ReportViewer1.LocalReport.Refresh()
ReportViewer1.LocalReport.EnableExternalImages = True
' Print the label
Dim printerSettings As New System.Drawing.Printing.PrinterSettings()
Dim pageSettings As New System.Drawing.Printing.PageSettings()
ReportViewer1.SetPageSettings(pageSettings)
ReportViewer1.PrinterSettings = printerSettings
ReportViewer1.PrintToPrinter(printerSettings.Copies, printerSettings.Collate, 0, 0)
Next
You should really get into the habit of naming all of your controls, variables etc with meaningfull names. This will save you a ton of work in the future when you have to try and decipher what each 'ReportViewer1, TextBox1, x, z' etc means or what their functions are -
ASP>NET General Naming Conventions[
^]