forum

Home / DeveloperSection / Forums / Report Printing

Report Printing

Manmohan Jha228914-Feb-2014
How to use two loop in printing...

bool MorePagesToPrint=false;
int i=0;
float yLineTop = e.MarginBounds.Top;
 while (i < 70)
{
if (yLineTop + lineHeight > e.MarginBounds.Bottom)
{
 MorePagesToPrint = true;
return;
}
 else
{
e.Graphics.DrawString("TEST: " + i, myFont, Brushes.Black, new PointF(e.MarginBounds.Left, yLineTop));
int j=0;
while (j < 70)
{
e.Graphics.DrawString("SUBTEST: " + j, myFont, Brushes.Black, new PointF(e.MarginBounds.Left, yLineTop));
//
yLineTop += lineHeight;
j++;
}
yLineTop += lineHeight;
 i++;
}
}

if (MorePagesToPrint)
e.HasMorePages = true;
else
e.HasMorePages = false;


First loop work well...
after using second loop...
problem problem

Help me...

Updated on 17-Feb-2014

Can you answer this question?


Answer

2 Answers

Liked By