Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am using PRN file to print a barcode with Zebra Printer.
I am taking values from a Data table by using For LOOP.

I am getting only the LAST row Value in the data table.

When I Debug the Code with Break point All the Row values got printed.


What is the issue ? How to resolve?

Regards,
Palraj M
Posted
Comments
OriginalGriff 14-Nov-13 4:36am    
Without the relevant code fragment? Not a clue, and couldn't begin to guess...
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
Carlos1907 14-Nov-13 4:44am    
Please, provide some example code.
Only with your description, it's too hard to figure it out...

1 solution

Without code it’s difficult to solve this issue.
But from your problem statement, I understand few points.
While debugging you will get all the values but at the time of writing you will get only last value.
Inside for loop you are looping the values, but I guess you are writing the values outside for loop.
So my suggestion in you will take one global List<> object. Inside for loop you just add element to that List<> object.
And then outside of for loop just use that List<> object for print. I guess, it will solve your problem.
 
Share this answer
 
v2

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