Report Printing

Total Post:33

Points:231
C# 
C#
 1616  View(s)
Ratings:
Rate this:
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...
  1. Post:2

    Points:14
    Re: Report Printing

    Post is removed by the User.

  1. Post:2

    Points:14
    Re: Report Printing

    Also add some explainations, why is this loop, what are you doing, what problem?

Answer