Filtering Printers
You can filter the list of direct printers based on the user name or any other criteria. This is possible with an integration event. The event receives the direct printer name and the local printer name and determines if the printer should be removed from the list of available printers.
Here is the definition of the event:
[IntegrationEvent(false, false)]
localprocedureOnFilterDirectPrinters(CloudPrinterName: Text; LocalPrinterName: Text; var RemoveFromList: Boolean)
begin
end;
And this is an example of how to use it:
[EventSubscriber(ObjectType::CodeUnit, Codeunit::"ForNAV Local Printers", 'OnFilterDirectPrinters', '', false, false)]
local procedureOnFilterDirectPrinters(CloudPrinterName: Text; LocalPrinterName: Text; varRemoveFromList: Boolean)
begin
if CloudPrinterName > 'P' then RemoveFromList := true;
end;
The sample will remove any direct printer from the list where the name is greater than P.
Note
Requires Customizable Report Pack 7.4.0.0 or newer.