Hi,
When I try to print the report from AP - Payment transfer - Return file - vendor, I get the error:
"ReportRun object not initialized.
Stack trace
(C)\Classes\VendPaymReconciliationImport\printControlReport - line 26
(C)\Classes\VendPaymReconciliationImport_NO\run - line 7
(C)\Classes\VendPaymReconciliationImport_NO_IP\run - line 7
(C)\Classes\VendPaymReconciliationImport\main - line 19
(C)\Classes\FormFunctionButtonControl\Clicked
(C)\Forms\CustVendPaymReconciliation\Designs\DesignList\VendPaymReconciliationImport\Methods\Clicked - line 3"
in VendPaymReconciliationImport\printControlReport -method there's interesting line:
reportRun = new MenuFunction(menuitemOutputStr(CustVendPaymReportJournalRun), MenuItemType::Output).create(args);
This doesn't return anything to reportrun and then it fails when reportRun.init() is called. I read that ReportRun -class shouldn't be used in AX anymore. I have tried to use other alternatives like:
new MenuFunction(menuitemOutputStr(CustVendPaymReportJournalRun), MenuItemType::Output).run(args);
But that doesn't work properly either. It just opens the dialog for the report and report doesn't return any rows. I think it should work so that it automatically prints the lines without the prompt.
Does anyone have ideas how to handle with this one?
Thanks,
Migi