You can access the edtCopies edit box using the TppReport.PrintDialog property. Inside the OnBeforePrint event perhaps, you could check this value and update a global variable elsewhere keeping track of all copies made.
The report prints a ticket with location code eg 517 - 001(pcnnew) I have tried this on onbeforeprint,onbeforegenerate,onafterprint and onaftergenerate When printing the number of copies defaults to 3. This automatically adds 3 to the pcnnew values and prints 3 tickets as 517- 004
The PrinterSetup.Copies property will remain the same for each copy printed. You will need to keep track of the copy that is being printed in a global variable in your application in order to add the copy number to the table in your DB. Take a look at the following example of creating a unique caption on the report for each copy. You will need to use the same concept in your case...
Comments
You can access the edtCopies edit box using the TppReport.PrintDialog
property. Inside the OnBeforePrint event perhaps, you could check this
value and update a global variable elsewhere keeping track of all copies
made.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I use the following code
form1.pcnnew :=
ppReport_ppreport_tickets_dot_Matrix.PrinterSetup.Copies;
form1.pcnnew := form1.pcnold + form1.pcnnew;
datamodule7.Table_Sites.edit;
datamodule7.Table_Sites.FieldByName('PCN').AsInteger := form1.pcnnew;
datamodule7.Table_Sites.post;
The report prints a ticket with location code eg 517 - 001(pcnnew)
I have tried this on onbeforeprint,onbeforegenerate,onafterprint and
onaftergenerate
When printing the number of copies defaults to 3.
This automatically adds 3 to the pcnnew values and prints 3 tickets as
517- 004
I am trying to produce 517-002 517-003 517-004
Which event should I place this code please.
Steve W
The PrinterSetup.Copies property will remain the same for each copy printed.
You will need to keep track of the copy that is being printed in a global
variable in your application in order to add the copy number to the table in
your DB. Take a look at the following example of creating a unique caption
on the report for each copy. You will need to use the same concept in your
case...
http://www.digital-metaphors.com/tips/UniqueCaptionForEachCopy.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com