NAS Err: You cannot print to <Printer name> winspool <Dataport

Colleagues, I would like to automate average cost accounting via NAS. When performing operation RepOk := Rep.SAVEASHTML(FileName) NAS gives out the following error: You cannot print to Using rep.RUN does NOT suit us, as in this case we get the following error: You do not have permission to modify records in the Value Entry table. Could you advise anyth.? Thanks in advance

It’s the same problem but You just get different methods depending on how You run the report.

I guess You are not running the latest exe’s? I think this is corrected in later versions.

If You coment out all MODIFY-statements in the report and instead call a codeunit where you create a function to which you pass the record you want to modify as a VAR and do the modify in the codeunit it will work. You will of course need to set permissions on the codeunit so it can modify ledger entries.

The problem is that NAS cant handle the permissions declared in the reports’ properties. But ti works in codeunits.

Thank you very match! It’s work!

You’re welcome. That one isn’t that easy to figure out otherwise…