Hey all,
I thought I had a brilliant idea today, but I think I ran into a brick wall.
My idea was to have a report (or codeunit, doesn't matter) that you could specify a report to run. Once that report completed, my code would send me an email notification.
Unfortunately, NAV doesn't transfer control back to my code until after the called report is closed... is there a way around this?
Michael Hollinger
Systems Analyst
NAV 2009 R2 (6.00.34463)
0
Answers
How about print the report to PDF, XLS, and then freely close the report?
Andwian
Though I haven't tried it, it should work fine with reports that you send to a printer.
The only problem is reports that you wish to preview... but you gave me an idea. Users can simply print the report to a PDF printer! =D> Thank you for the idea!
The goal of the code was for it to work with any report WITHOUT having to modify the target report... I think I've done it well enough that I can release it to my users.
Here's my code, hope others may benefit as well. Please respond here with any improvements!
WARNING: This functionality exposes ALL reports and dataports to the user, INCLUDING objects that are not visible to the user on the Navigation Pane! At this time, only Super Users should have access to this object!!
Systems Analyst
NAV 2009 R2 (6.00.34463)
Actually, what I was trying to say was: since NAV could not transfer control back to my code until after the called report is closed, I think that is because the report is in the preview mode, and you should close the report before take the control back. Hence, the solution :idea: maybe: print it to PDF or somewhat, instead of preview it, and let's see if NAV could take the control back, because it did not preview at all, hence no preview window must be closed.
Andwian
Systems Analyst
NAV 2009 R2 (6.00.34463)
WARNING: This functionality exposes ALL reports and dataports to the user, INCLUDING objects that are not visible to the user on the Navigation Pane! At this time, only Super Users should have access to this object!!
I currently don't have an easy solution for this.
Systems Analyst
NAV 2009 R2 (6.00.34463)