Closed innonav-dev closed 3 years ago
This is no AL bug, but a browser restriction. See the purple box in this article: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/report/report-run-method#remarks
Hi! Please take a minute to read the guidelines for this repository https://github.com/microsoft/AL and our collection of frequently asked questions https://github.com/Microsoft/AL/wiki/frequently-Asked-Questions .
As this repository is only for issues related to the AL compiler in latest developer preview environment for Dynamics 365 Business Central. We suggest that you open a support case or file a bug in Collaborate, to ensure that all Business Central users benefit from your catch as soon as possible.
To open a support case, you can:
If you file the bug in Collaborate, remember to include steps to reproduce the issue, and the Business Central build number and country version you're using.
1. Describe the bug If more than one report without a request page is executed within the same transaction, then the result of the last report is returned only. The print output of all other reports is ignored.
2. To Reproduce
Code example:
3. Expected behavior Both reports should be downloaded / printed as pdf or the chosen printer.
4. Actual behavior Only the output of the last report executed is downloaded / printed.
Example: Result TestPrintWithoutConfirm: The pdf of the last report (Sales Shipment) executed is downloaded / printed only. The first (Sales Invoice) is missing.
Result TestPrintWithConfirm: Step 1: As soon as the confirm message appears, the pdf of the first report (Sales Invoice) is downloaded / printed.
Step 2: After submitting the confirm message, the second report (Sales Shipment) is also downloaded / printed successfully.
An Interruption of the code fixes the behaviour, but of course it is not a solution in any case. For example a post & print functionallity which prints some additional documents like general terms.
5. Versions: