Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Automatically exported report to file saved 3 times instead of 1

Posted on by 6,414

Hello,

we have customized class that exports the quotation report into mhtml file.

To export file in desired destination, we have applied the path in document types.

After we run the report and customized class is executed we see that in the path applied in doc types 2 mhtml files are created with different names (e.g. mhtmlFile.mhtml and mhtmlFile_001.mhtml). 

But, also in the same path somehow new folder with random name is created and inside of this folder same mhtmlFile.mhtml is created.

As we debugged the code files are created in class SrsReportRunPrinter, method toFile().

Everything is standard code instead of our customized class, from where we call SalesQuotationEditLinesForm_Sales_Send.printJournal() once.

Below the call stack untill the toFile method.

[c] \Classes\SrsReportRunPrinter\toFile 25
[c] \Classes\SrsReportRunPrinter\printReport 15
[c] \Classes\SrsReportRunService\runReport 43
[c] \Classes\SrsReportRunImpl\runReport 7
[c] \Classes\SrsPrintMgmtController\runReport 65
[c] \Classes\PrintMgmtReportRun\execute 41
[c] \Classes\FormLetterReport\execute 10
[c] \Classes\SrsPrintMgmtFormLetterController\outputReport 17
[c] \Classes\TradeDocumentReportController\outputReport 18
[c] \Classes\SrsPrintMgmtFormLetterController\runOutputReports 26
[c] \Classes\SrsPrintMgmtController\outputReports 80
[c] \Classes\TradeDocumentReportController\output 6
[c] \Classes\SalesQuotationController\output 6
[c] \Classes\TradeDocumentReportController\runPrintMgmt 17
[c] \Classes\SrsPrintMgmtController\run 30
[c] \Classes\SysOperationController\startOperation 10
[c] \Classes\SrsReportRunController\startOperation 12
[c] \Classes\SrsPrintMgmtController\startOperation 14
[c] \Classes\SrsPrintMgmtFormLetterController\startOperation 14
[c] \Classes\SalesQuotationController\main 13
[c] \Classes\xMenuFunction\runClient
[s] \Classes\MenuFunction\runClient 18
[s] \Classes\MenuFunction\runSSRSMenuItem 8
[s] \Classes\MenuFunction\run 70
[s] \Data Dictionary\Tables\CustQuotationJour\Methods\printJournal 31
[s] \Classes\SalesQuotationEditLinesForm_Sales_Send\printJournal 8
[s] \Classes\customizedClass\printJournal 5
[s] \Classes\customizedClass\run 52
[s] \Classes\customizedClass\mainOnServer 77
[c] \Classes\customizedClass\main 29
[c] \Classes\FormFunctionButtonControl\Clicked

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans