Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Mysterious Header-only page after p5, every other page thereafter

edited March 2005 in General
By the way, thanks for the great support -- previous issues resolved. Now,
however, I'm getting a blank page after page 5. Blank that is, except for
the report header. This is 100% consistent.

My report is a one-page report (the one I've been asking questions about
recently) that has no datasource. All data is supplied either by gettext
event handlers or by placing label objects on the detail band & setting
properties.

The report is based on a query. I loop through the records printing the
report for each rec. Here's the code that prints each instance:

procedure TfrmRPC.PrintBatchItem(cert: TdbCertificate;EndOfJob: boolean);
begin
gcert := cert;
rpcBuild;
lPrinterDevice.EndPrintJob := EndOfJob; //true when on last record
ppReport1.PrintToDevices;
lPrinterDevice.StartPrintJob := false; //initialized to true before 1st
report is printed.
end;

procedure tfrmrpc.rpcbuild;
var
rpcLines: tstringlist;
begin
rpcLines := tstringlist.Create;

if (gcert.CancelMethod=cm_78a) then rpc78(rpcLines)
else if (gcert.CancelMethod=cm_78b) then rpc78(rpcLines)
else if (gcert.CancelMethod=cm_78c) then rpc78(rpcLines)
else if (gcert.CancelMethod=cm_pda) then rpcPD(rpcLines)
else if (gcert.CancelMethod=cm_pdb) then rpcPD(rpcLines)
else if (gcert.CancelMethod=cm_msr) then rpc78(rpcLines)
else if (gcert.CancelMethod=cm_srb) then rpc78(rpcLines)
else if (gcert.CancelMethod=cm_b8) then rpcB8(rpcLines) //jhg 03/27/2005
else if (gcert.CancelMethod=cm_p90) then rpcPD(rpcLines); //jhg 03/27/2005

clearAddedComponents; //deletes labels added programmatically from prior
prints
rpcLinesPut(rpcLines); //adds labels to detail band
rpcBottomTextPut; //sets label text & visibility

rpcLines.Free;
end;

Comments

  • edited March 2005
    My bad. Failure to clear an object list caused a section to grow longer
    than a page.

    Jeremy


This discussion has been closed.