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 :
Microsoft Dynamics AX (Archived)

Customization Reports

(0) ShareShare
ReportReport
Posted on by

Hi, I created two report extension on standard report. In the first extension i modify the design and in the second i create a new design. i choose the two design in the print management based on query condition but only one design  was executed.

I followed the microsoft docs : 

1. Create a new model for your application customizations. For more information about extension models, see Customization: Overlayering and extensions. For this example, you add a model that is named Application Suite Extensions, and that references the Application Suite, Application Platform, and Application Foundation packages.
2. Create a new project in Microsoft Visual Studio. Make sure that the project is associated with your extension model. The following illustration shows the project settings.

3. Create a custom report design for the business document. You must make sure that your custom solution consumes the correct report data contract. Find the existing Application Suite report in Application Explorer. This report is named SalesConfirm. Right-click it, and then click Duplicate in project to create the custom solution.
4. Rename the report so that it has a meaningful name. For this example, name the custom report SalesConfirmExt to distinguish it from the standard solution. Compile the project, and deploy the report to verify that the changes have no errors.
5. Use the free-form designer to customize the report design. Select the report design that is named Report, right-click it, and open the precision designer. Customize the design to satisfy the organization’s business requirements. The following illustration shows a custom design definition for the Sales confirmation report.

6. Add a new X++ class that extends the standard report controller. Give the class a name that appropriately describes that it's a handler for an existing application report. For this example, rename the class SalesConfirmControllerExt to distinguish it from other report controllers.
7. Use the extended class to load the custom design. Add a main method that refers to the custom report design. (You can just copy the main method from the standard solution and add references to the new Controller class.) Here is the code that extends the standard solution.
class SalesConfirmControllerExt extends SalesConfirmController
{
public static SalesConfirmControllerExt construct()
{
return new SalesConfirmControllerExt();
}
public static void main(Args _args)
{
SrsReportRunController formLetterController = SalesConfirmControllerExt::construct();
SalesConfirmControllerExt controller = formLetterController;controller.initArgs(_args, ssrsReportStr(SalesConfirmExt, Report));
if (classIdGet(_args.caller()) == classNum(SalesConfirmJournalPrint))
{
formLetterController.renderingCompleted += eventhandler(SalesConfirmJournalPrint::renderingCompleted);
}
formLetterController.startOperation();
}
}

8. Add a new report handler (X++) class to the project. Give the class a name that appropriately describes that it's a handler for Print management–based documents. For this example, rename the class PrintMgtDocTypeHandlerExt to distinguish it from other object handlers.
9. Add a delegate handler method to start to use your custom report. In this example, extend the getDefaultReportFormatDelegate method in the PrintMgtDocTypeHandlerExt class by using the following code.
class PrintMgtDocTypeHandlersExt
{
[SubscribesTo(classstr(PrintMgmtDocType), delegatestr(PrintMgmtDocType, getDefaultReportFormatDelegate))]
public static void getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result)
{
switch (_docType)
{
case PrintMgmtDocumentType::SalesOrderConfirmation:
_result.result(ssrsReportStr(SalesConfirmExt, Report));
break;
}
}
}
10. Extend the menu item for the application report. Find the existing Application Suite menu item in Application Explorer. This menu item is named SalesConfirmation. Right-click it, and then click Create extension. Open the new extension object in the designer, and set the value of the Object property to SalesConfirmControllerExt to redirect user navigations to the extended solution.
1. Update the Print management settings to use the custom business document. For this example, go to Accounts receivable > Setup > Forms > Form setup. Click Print Management, find the document configuration settings, and then select the custom design. The following illustration shows the Print management settings after the changes have been compiled.

*This post is locked for comments

I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans