Paper Trays, Paper Bins, Paper Sources

The paper tray selection (also called the paper bin or the paper source) in ForNAV reports can be controlled with the following function call:

C/AL: ReportForNav.PrinterSettings. PaperSource(<TrayNo>,<PageNo>);

JavaScript: CurrReport.PrinterSettings. PaperSource(<TrayNo>,<PageNo>);


With the special cases:

PageNo = 0: Default

PageNo = -1: Last page


You can also still set up the paper tray using the GetPaperTrayForReport procedure in codeunit 1:

A common problem setting paper sources is that the tray numbers are different from one printer driver to another. The standard NAV behavior is to ignore the setting if the tray does not exist.

In ForNAV, you can test this in the OnPreReport by setting the following ReportForNav.PrinterSettings.ValidatePaperSource := TRUE (which will give you an error if the tray does not exist on the selected printer).

Alternatively, you can use the built-in capabilities in BullZip: