RB10.06 D6 Number of Copies
Hi
I have the following need.
Background
The Travel Booking System needs to support the use of Travel Agents in
bookings. The part of this that is relevant
to RB is the production of documents such as Quotation, Invoice and
Itinerary.
When a booking is with an Agent there is a requirement to produce a single
PDF file which contains
two copies of the given document one for the Agent and one for the Client.
Now each copy has the relevant
information for the relevant party i.e. Address and various financial
information si different.
Issue
In the ideal world I would like the report to decide to produce 1 or 2
copies and for the copy number
to be available to the code i.e.
if copyNumber = 1 then
doAgentStuff
...
if copyNumber = 2 then
doClientStuff
...
So rather than the user choose 2 copies (which they will forget to do) I
want the report to do it.
I have experimented with
Report.PrinterSetup.Copies := 2;
Which does not produce 2 copies in the Preview but does default to 2 copies
when printed.
Is there a property to tell me the copy number and is it possible to set the
report to do the setting of
the number of copies.
regards
Andrew
I have the following need.
Background
The Travel Booking System needs to support the use of Travel Agents in
bookings. The part of this that is relevant
to RB is the production of documents such as Quotation, Invoice and
Itinerary.
When a booking is with an Agent there is a requirement to produce a single
PDF file which contains
two copies of the given document one for the Agent and one for the Client.
Now each copy has the relevant
information for the relevant party i.e. Address and various financial
information si different.
Issue
In the ideal world I would like the report to decide to produce 1 or 2
copies and for the copy number
to be available to the code i.e.
if copyNumber = 1 then
doAgentStuff
...
if copyNumber = 2 then
doClientStuff
...
So rather than the user choose 2 copies (which they will forget to do) I
want the report to do it.
I have experimented with
Report.PrinterSetup.Copies := 2;
Which does not produce 2 copies in the Preview but does default to 2 copies
when printed.
Is there a property to tell me the copy number and is it possible to set the
report to do the setting of
the number of copies.
regards
Andrew
This discussion has been closed.
Comments
Are you exporting the report to PDF using the build-in PDF Device? If so,
the copies property will not have any effect on the output. To print two
copies of a report to PDF, you will essentially need to call Report.Print
twice with different parameters.
If you are printing (exporting) from within the application, the above will
be trivial, however if you are printing from the preview window of RB, you
will either need to take control of the print button or create a custom
preview that does the same.
Let me know a bit more information about how your application functions and
exactly what you would like to happen (from an end-user's point of view).
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks for the quick reply.
The user would not control the print out as the PDF file is sent through a
process which sends it across the internet to a central agent system so it
is definately automatic. I mentioned the preview screen as when I am
developing it would be great to see the two copies on it for checking
purposes.
From the users point of view they will tell the system what document to
print and to send it to the AXS-ONE print queue that is all.
Ideally I was looking for something where the report generation itself took
care of this rather than the front end if that is possible. I could modify
my server I guess to do the job though.
regards
Andrew
If you are exporting to a file type (i.e. PDF) using a device plugin such as
the built-in PDF device, there is no concept of copies for the report. The
easiest way would be to simply print the report twice (perhaps coding a
loop) as I mentioned before.
Another option would be to create a report containing two section style
subreports and loading the same template into each. When this report is
printed it will essentially give you two copies as a single file.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com