I'm trying to call a report from within a Codeunit, and I want certain options to populate on the Options tab. Specifically, it's report 795, Adjust Cost - Item Entries, but I actually have this question for any report. And specifically, I want to have the "Post to G/L" checked when I run this report.
I know a good way of doing this is making a function in the report called Initialize with the variables as parameters, and then I can call this function from the Codeunit, before I run the report from the Codeunit.
The problem is that I can't modify 795, because I'm not a partner (Item Ledger Permissions error), so I'm wondering if there's another way to call 795 (or other reports) with specific options, without modifying the report.
Thanks in advance!
Joseph Dewey
Microsoft Dynamics NAV User
0
Comments
RIS Plus, LLC
Microsoft Dynamics NAV User
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
RIS Plus, LLC
The answer is no, without modifications a report's option can't be specified from another object (codeunit, report,...) unless a function is already available.
|To-Increase|
The only problems are that you have to mark "Automatic Cost Posting" as False, and the second report prints out some output.
Microsoft Dynamics NAV User