hello
I have form that content of labels and image and datagridview.
now i want to print this contents, for that, i use this snippet:
int i = 0;
while (i < DataGridView2.Rows.Count)
{
// regionone
if (y > e.MarginBounds.Height)
// regionone-end{y = 50;e.HasMorePages = true;return;}
if (DataGridView2.Rows[i].Cells[5].Value.ToString() == label10.Text){e.Graphics.DrawString(DataGridView2.Rows[i].Cells[0].Value.ToString(), font , Brushes.Black, new Point(770, y + 7), format1);..............y += 35;}
i++;
}
when i use this snippet, by using regionone for produce more than one printed pages, but i have only one page Duplicated with the same data, and the remain contents did not printed at all.
when i change the place of regionone (put it befor if syntax, at the end of if syntax, at the first of while loop,.....) but i get only one printed page Duplicated.
when i remove "return;" i get all required data on the (same) one page.
can you help me
Thank you
Mohammad OlwanPosted Apr 1, 2016, 1:41 AM
Mohammad OlwanPosted Apr 1, 2016, 1:39 AM
Rajeesh MenothPosted Mar 31, 2016, 12:15 PM
Rohit ManePosted Mar 31, 2016, 12:06 PM