Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Cannot call the correct Sales invoice SSRS report format with print management

(1) ShareShare
ReportReport
Posted on by 6,603
Hello:
 
Hopefully I can explain this clearly.
 
We have a modified Sales invoice report currently in the system (e.g. SalesInvoice.ABC, ABC being the model). The code below was written to allow configuration in Print management. It's the only customized version and it works fine. 
 
[SubscribesTo(classstr(PrintMgmtDocType), delegatestr(PrintMgmtDocType, getDefaultReportFormatDelegate))]
    public static void getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result)
    {
        switch (_docType)
        {
            case PrintMgmtDocumentType::SalesOrderInvoice:
                _result.result(ssrsReportStr(abc_SalesInvoice, Report));
                break;
        }
    }
 
Now, I'm creating another version of the Sales invoice report (e.g., SalesInvoice.XYZ) using the base MS report. This will be used for a specific legal entity. I wrote the same code as above except specifying my version of the report. 
 
Under AR print management setup, I can see my report (xyz_SalesInvoice) for the Customer invoice document as well as the other customized version (abc_SalesInvoice). The problem is, even with xyz_SalesInvoice configured in Print management, when the report runs, it still calls the abc_SalesInvoice version. I would assume Print management would return the version configured but obviously that's not the case. 
 
Thank you! 
  • bankk Profile Picture
    bankk 6,603 on at
    Cannot call the correct Sales invoice SSRS report format with print management
    Hello Mohit,
    I will certainly give this a solution a try. I will mark as solution if it works. Thank you! 
  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,547 Super User 2024 Season 1 on at
    Cannot call the correct Sales invoice SSRS report format with print management

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!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans