Hello, in one report i have to print one text in the original document and anothertext in copy 1 and another one in copy to. How can i change the text with RAP of ppSystemVariable depending on the copy number?
It is currently not possible to access the CopyNo value of a SystemVariable at runtime at a point where you could use the value to change the report. It is possible however to keep track of the copy number manually using Delphi or RAP code. See the following article.
I have another problem, i select 2 copies and print to PDF. When i print, the PDF file only has one copy, not 2 copies of the report, and from the preview each time i print, th copy number in the label increments by one.
The Copies property is part of the PrinterSetup and only applies when printing to the printer. The file devices are not capable of exporting multiple copies of a single report. You will need to export the same report multiple times if you want to create copied exports.
Comments
It is currently not possible to access the CopyNo value of a SystemVariable
at runtime at a point where you could use the value to change the report.
It is possible however to keep track of the copy number manually using
Delphi or RAP code. See the following article.
http://www.digital-metaphors.com/rbWiki/Delphi_Code/Formatting/How_To...Unique_Caption_for_Each_Copy
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Hi Nico, i have tried this but it does not run. RB 11.08.
I do not use pagestyle, is a label in the footer.
procedure ReportBeforePrint;
begin
gCopy := 0;
end;
procedure ReportOnStartPage;
begin
if Report.SecondPass and (Report.AbsolutePageNo = 1) then
gCopy := gCopy + 1;
end;
procedure FooterBeforePrint;
begin
if( gCopy = 0 )then
lCopia.Caption := 'Ejemplar para el paciente'
else if( gCopy = 1 ) then
lCopia.Caption := 'Ejemplar para el centro'
else
lCopia.Caption := 'Copia adicional';
end;
procedure PageStyleBeforePrint;
begin
if( Report.PrinterDevice = nil) then
gCopy := 0;
end;
When i preview the report, i see like gCopy = 0. When i print from
preview two copies to PDF (Acrobat PDF printer) i get in both copies
like gCopy=1.
print, the PDF file only has one copy, not 2 copies of the report, and
from the preview each time i print, th copy number in the label
increments by one.
The Copies property is part of the PrinterSetup and only applies when
printing to the printer. The file devices are not capable of exporting
multiple copies of a single report. You will need to export the same report
multiple times if you want to create copied exports.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com