
This may happend with casuality and with many different priters and OS's. For example, if i print a mail-merge document of 20 records, may be that 2 or 3 pages have a black square instead of the real image! Does someone have any ideas?

Code: Select all
RVPrint1.AssignSource(RVE_mother);
RVPrint1.FormatPages(rvdoALL);
if rvpp.RVPrint.PagesCount=0 then exit;
with printdialog1 do
begin
minpage:=1;
maxpage:=rvpp.RVPrint.PagesCount;
frompage:=minpage;
topage:=maxpage;
old_printer:=printer.printerindex;
if execute then
begin
if old_printer<>printer.PrinterIndex then // <== these lines are essential
RVPrint1.FormatPages(rvdoALL); // <== these lines are essential
if printrange=prAllPages then
tRVPrint(rvpp.RVPrint).Print('PuntHoofd',1,False)
else
RVPrint1.Printpages(frompage,topage,'PuntHoofd',1,false);
end;
end;