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

About setup the [Copies] and [Collation] on Print Dialog

edited December 2002 in RAP
Hi,

I am writing an End User Reporting Program. I have one form which can allow
user to insert the number of copies before print. I also have writtern a
function in RAP to get that number. The
function is work. I have writtern the following RAP in the
Report.BeforePrint:

Report.PrinterSetup.Copies := MyRAPcopies;
Report.PrinterSetup.Collation := False;

[MyRAPcopies] is my RAP function to get the number of copies. I found that
the Event is worked when I preview (ppReportExplorer.PrintPreview) the
report first then press print button.
However, this event does not work when I directly print
(ppReportExplorer.Print) the report, anyone have the solution?

Thanks,
Raymond Ng.

Comments

  • edited December 2002
    RAP doesn't begin executing until after the print dialog is closed and the
    report begins generating pages after you've pressed the print button from
    the report exlporer. What you'll have to do in this case is set the
    Report.PrinterSetup.Copies in the OnLoadEnd event of the Report.Template.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited December 2002
    Hi,

    Sorry, can you mind to provide me a sample program which show how to
    implement a OnLoadEnd event in the Report.Template? Since I fail to do this.

    Thanks.
    Raymond Ng.

  • edited January 2003
    See the Templates thread in the TechTips newsgroup. It has an article on
    this. Also, see the End User demo for the Report Explorer. It utilizes and
    OnLoadEndEvent handler on the report template.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.