Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How print ScatterGraph in multiple pages?

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

0 Kudos
Message 1 of 2
(5,424 Views)

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.

Ian M.
National Instruments
0 Kudos
Message 2 of 2
(5,397 Views)