Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: function "MergeWordLayout" in codeunit 9651 "Document Report Mgt." -> Usage of parameter "PrinterName" on event "OnBeforeMergeDocument" #3163

Closed
pro4dynamix opened this issue Jul 5, 2019 · 1 comment
Labels
wontfix This will not be worked on

Comments

@pro4dynamix
Copy link

Hello,

we are using the "OnBeforeMergeDocument" event in funktion "MergeWordLayout" (Codunit 9651 "Document Report Mgt.") in order to provide a alternate ISV solution for printing/exporting reports.

The standard call, which is allready implemented is:
OnBeforeMergeDocument(ReportID,ReportAction,InStrXmlData,PrinterName,OutStrWordDoc,Handled,FileName = '');

But we need the parameter "FileName" instead of "PrinterName":
OnBeforeMergeDocument(ReportID,ReportAction,InStrXmlData,FileName,OutStrWordDoc,Handled,FileName = '');

Maybe this is a bug or a unfortunate implementing in the current solution.

If we do not get the "FileName" as parameter in the event call, we do not have a chance to implement a different version of for example "SAVEASPDF" in the "OnBeforeMergeDocument". Because "PrinterName" is only filled, if the ReportAction is "Print". We can not access the "FileName", which is nessesary in this case.

I think, this would be a great benefit, even for everyone, who wants to use this "OnBeforeMergeDocument" event and it would not crash current implementions, because the "FileName" even holds the printername, if the ReportAction is "Print".

Best regrads
Jürgen Markgraf

@StanPesotskiy
Copy link

Right, PrinterName parameter gets a value only if report action is printing.
The internal FileName value will not be exposed due to security reasons, the only thing we provide is a flag IsFileNameBlank. It was added as an answer to GitHub 3125

@StanPesotskiy StanPesotskiy added the wontfix This will not be worked on label Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants