web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Show multiple report designs from custom free text invoice report in print management

(0) ShareShare
ReportReport
Posted on by 95

I have created a couple new designs for Free Text Invoice reports. I have been able to add the report designs to print management selection with the code below, but only the the second report shows up in print management. I can swap the order and build again and then both show up, but that doesn't work when deploying the package to other environments, only the second report shows up. How do I get both report designs to show up in print management?

[SubscribesTo(classStr(PrintMgmtDocType), delegateStr(PrintMgmtDocType, getDefaultReportFormatDelegate))]
public static void PrintMgmtDocType_getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result)
{
    switch (_docType)
    {
        case PrintMgmtDocumentType::SalesFreeTextInvoice:
            _result.result(ssrsReportStr(FreeTextInvoice_Red, Report1));
            _result.result(ssrsReportStr(FreeTextInvoice_Red, Report2));
            break;
    }   
}

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,099 on at

    Hi NayshIB,

    "getDefaultReportFormatDelegate" used only to point to default report format if you don't have anything specified in print management.

    If you want to add own report formats, you need to add records to PrintMgmtReportFormat table. Also, there is already standard class "PrintMgmtReportFormatPopulator" used to populate standard formats into this table. Also, check PrintMgmtReportFormatSubscriber class as a starting point if you want to implement own populator class.

  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    You need something like this:

    [ExtensionOf(classStr(PrintMgmtReportFormatPopulator))]

    final public class PrintMgmtReportFormatPopulator_My_Extension

    {

        #PrintMgmtSetup

        #ISOCountryRegionCodes

        public void populate(boolean _deleteAll, boolean _showConfirmation)

        {

            // populate the standard application solutions

           next populate(_deleteAll, _showConfirmation);

           this.addOther(PrintMgmtDocumentType::SalesFreeTextInvoice, ssrsReportStr(FreeTextInvoice_My, Report), ssrsReportStr(FreeTextInvoice_My, Report), #NoCountryRegionId);

        }

    }

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 536 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 320 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 210

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans