31 March 2020

Parameter _reportName cannot be null or empty - in D365 F&O

lately we receive the error message "Parameter _reportName cannot be null or empty" when trying to print a report from a journal with view copy or view original. Reprinting using print management is working fine. 
This issue only occurred in our SAT environment in all other environments, Dev, Test and Build it was working as expected.
In older days (AX 2012) I just did a full compile when I got this error. But what to do now? 
After a bit of debugging the result was quite interesting: The print management framework is looking for a report format in the table PrintMgmtReportFormat. The select statement has a where clause which looks for the report and requires the field system to be true. In our DB somehow the reports we were looking for had system flag = no so the _reportName was really empty.
So for everyone who is getting this error message in D365 F&O check the PrintMgmtReportFormat table.


No comments: