Set Printer in Auto Print widget at runtime through data directive

I have a data directive that I am printing a report when another report is printed. I can make it all work I believe but I am not sure how to set the printer. I have a variable with the printer name from the first report but can’t seem to set it. In classic this was done by code calling the adapter for the report and submitting it to agent. I tried through events but the report adapters aren’t available in REST-ERP widget. Any idea if it is possible to set it at runtime like this