Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Greeting!
How can I print items barcode sticker in datagrid view based on quantity
I used this code but it reprints all items with the quantity of each item

For i As Integer = 0 To DGVItem.Rows.Count - 1
PrintBarCode.PrintToPrinter(DGVItem.Rows(i).Cells(3).Value, False, 0, 0)
Next


I just want to print ten barcode stickers not 60 barcode stickers


-----Code---Item---Price---Quantity---Total

Row1----1---Item1---100--------2--------200

Row2----2---Item2---150--------4--------600

Row3----3---Item3---200--------5--------1000

Row4----4---Item4---250--------4--------1000

Thanks a lot

What I have tried:

For i As Integer = 0 To DGVItem.Rows.Count - 1
PrintBarCode.PrintToPrinter(DGVItem.Rows(i).Cells(3).Value, False, 0, 0)
Next
Posted
Comments
Richard MacCutchan 7-Jan-22 4:17am    
That loop should print one item per row. There must be some other code that you are not showing us.
[no name] 7-Jan-22 11:48am    
It's in the black box (PrintToPrinter).

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900