Set number of copies in a FORNAV report
FORNAV has a great tool for setting the number of copies in a report. Instead of adding a CopyLoop data item, you can simply set the number of copies with a function call.
There are a few steps to add this code. First, you need to create a global variable to hold the number of copies:
Next, you set the No. of Copies on the report request page:
Finally, you set the number of copies in the OnPreReport trigger for the Universal Code version of FORNAV reports:
And the version for the DLL based reports:
Set the No Of Copies when you run a report
In some cases, you might need to set the No Of Copies when you run a report from AL Code. You can do this by setting the NoOfCopies request page value in the report parameters.
You can find the full code on GitHub: https://github.com/fornav/ForNav.Training/tree/master/FORNAV.SetNoOfCopies
