Hello, I use this code to generate a label, but I need to print a label number, 1 of 3, 2 of 3, 3 of 3 etc.
Call MessBox("¿Imprimir Etiqueta?", MB_YESNO, "Confirmación")
Response = MessResponse()
If Response = IDYES Then
cad = " 11600/RUN " + PRMSEP + " 39codeT/FORMAT " + PRMSEP
cad = cad & "{XAVw_EtiquetaProd.refnbr} = " + SParm(GetObjectValue("crefnbr")) + "/WHERE"
cad = cad & PRMSEP + "/PSCRN"
serr1 = Launch("ROI" + cad, 1, 1, 1)
End If
i try to add a parameter to the rpt but when trying to print it manually asks for the number of labels to print but that process must be automatic
I try to pass the number of labels as a parameter but it only works for the sql statement and not for the RPT
cad = " 11600/RUN " + PRMSEP + " 39codeT/FORMAT " + PRMSEP
cad = cad & "{Table1.refnbr} = " + SParm(GetObjectValue("crefnbr")) + " and NumLabel="+ " SParm(GetObjectValue("NumLabels")) " +"/WHERE"
cad = cad & PRMSEP + "/PSCRN"
serr1 = Launch("ROI" + cad, 1, 1, 1)
End If
I try using a loop to print the label but it does not work, ROI.exe crashes
dim NumLabel as integer
NumLabel = val(GetObjectValue("NumLabels"))
If Response = IDYES Then
cad = " 11600/RUN " + PRMSEP + " 39codeT/FORMAT " + PRMSEP
cad = cad & "{XAVw_EtiquetaProd.refnbr} = " + SParm(GetObjectValue("crefnbr")) + "/WHERE"
cad = cad & PRMSEP + "/PSCRN"
For VAR = 1 To NumLabel
serr1 = Launch("ROI" + cad, 1, 1, 1)
Next VAR
End If
thanks for your help
*This post is locked for comments