02-01-2013 03:56 PM
I have a graph that plots three different type of waveforms and need to print each one of them on a page. How do I print 3 pages of different graphs. If I set hasmorepages to true, it still prints the last graph and only give me 1 page (instead of 3 pages).
Here is the code:
private void PrintPageEntireGraph(object sender, PrintPageEventArgs e)
{
Graphics g = e.Graphics;
Rectangle bounds = e.MarginBounds;
int TotalGraph = 3;
for (int i = 1; i <= TotalGraph; i++)
{
logGraph.Draw(new ComponentDrawArgs(g, bounds));
PlotGraph(i); // Routine to have logGraph plot different waveform;
e.HasMorePages = (i < TotalGraph);
}
Thanks,
Yajai
02-04-2013 05:03 PM
It seems like what is happening here is that you might be plotting over your previous graphs. Try setting a break point and stepping through your code.