Wrong data when printing multiple copies of a report
I am designing a dispatch label print. The user selects the record in a
table that they want be print one or more Dispatch Labels for. If they
select a record and only print one label then all is OK the fields on the
label are populated from the selected record. If they print more than one
record then the first label is OK however the second and subsequent labels
print details of a record from the previous customer.
Before printing I set:
ppDispatchlabels.PrinterSetUp.Copies := iNoLabels;
ppDBPiplnSaDispat.RangeBegin := rbCurrentRecord;
ppDBPiplnSaDispat.RangeEnd := reCurrentRecord;
ppDispatchLabels.Print;
Have tried using the BeforePrint, AfterPrint and EndOfPage events to ensure
that the correct record is active, with no luck.
I'm sure the answer is simple but have spent hours on this and am running
out of ideas.
table that they want be print one or more Dispatch Labels for. If they
select a record and only print one label then all is OK the fields on the
label are populated from the selected record. If they print more than one
record then the first label is OK however the second and subsequent labels
print details of a record from the previous customer.
Before printing I set:
ppDispatchlabels.PrinterSetUp.Copies := iNoLabels;
ppDBPiplnSaDispat.RangeBegin := rbCurrentRecord;
ppDBPiplnSaDispat.RangeEnd := reCurrentRecord;
ppDispatchLabels.Print;
Have tried using the BeforePrint, AfterPrint and EndOfPage events to ensure
that the correct record is active, with no luck.
I'm sure the answer is simple but have spent hours on this and am running
out of ideas.
This discussion has been closed.
Comments
through the dataset from the first record. You are gonna want to change the
query, to onyl return the records that should be in the report. You are
using a TTable, you could traverse the datapipeline with bookmarks, as shown
in the installed main reports demo project #112.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com