Grid - Registered Users - Helpdesk
printing multiple pages
Thread Starter: peppe polpo Started: 7/18/2008 8:47 AM UTC
Replies: 2
printing multiple pages


I'd like to print multiple grids (Grd1...Grd8) in one shot.

Every grid should be printed on a new page.

I wrote

var
   i,j: Integer;
   g:TProfGrid;
begin
   i := Grd1.BeginPrint;
   for j:=1 to 7 do
   begin
      printer.NewPage;
      g:=TProfGrid(FindComponent('grd'+IntToStr(j)));
      I := g.ContinuePrint(I+1, 0);
   end;
   printer.NewPage;
   Grd8.EndPrint(I+1, 0);

end;

However a funny gap is inserted on top of every new page (please see the attached video).

If I drop the      

printer.NewPage;

command, the next grid is not printed in a new page.

I have used PDFCreator to make all the process visible, but the same behaviour is seen when using a normal printer.

Please help

Peppe







Re: printing multiple pages


This message includes the following attachments:

Re: printing multiple pages
Hello Peppe:

I'd like to print multiple grids (Grd1...Grd8) in one shot.
Every grid should be printed on a new page.

Simply call the Print method for each grid (in a loop).

I wrote

If you want to follow this way, the first parameter of both ContinuePrint and EndPrint should be 0.


-Nicholas