Preset number of copies from outside a report.

FragenFrager
FragenFrager Member Posts: 69
Hello,
One of our customers uses a terminal solution, i.e. special reports are printed when documents are processed on a terminal.
The reports can be printed interactively from BC as well as via the terminal. When printing via terminal, the reports are called from a codeunit. When printing via terminal, the reports should be printed twice.
Preferably I would implement the number of prints via CopyLoop.
Since the request page should remain closed when printing via terminal, I would have to specify the number of copies from outside. The following problem arises: If I declare the report as a variable in order to call the function to determine the number of copies on this variable, I cannot suppress the output on the standard printer.
If I work with REPORT.RUNMODAL(... I don't have the option of executing a function on the report beforehand, a somewhat tricky situation.
Does anyone here have an idea of ​​how to proceed?

Answers

  • SanderDk
    SanderDk Member Posts: 507
    You can create a singleinstance codeunit to set the No of copies, and with the running report you can retrive the quantity from the single instance codeunit
    For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.
  • FragenFrager
    FragenFrager Member Posts: 69
    Thank you for your reply. Yes, I also took a singleinstance codeunit into consideration, but meanwhile I agreed with my teamleader to declare the report as variable an create a function within this report to set the number of copies.