How to: Specify a Report Design by Using X++ (MorphX Reporting Tools)

Important

This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

When a report has multiple designs, you can use X++ to specify which design will be displayed when the report is printed.

Specifying a Report Design

Use the ReportRun::design method to specify a report design.

To specify a report design

  1. In the Application Object Tree (AOT), expand the report node, right-click Methods, and then click New Method.

  2. In the new method, call the design method to specify a report design.

    In the following example, the design method specifies the ReportDesign2 design for the AssetAcquisition report.

    public void SetDesign()
    {
        Args ArgList = new Args(reportStr("AssetAcquisition"));
        ReportRun rr = new ReportRun(ArgList);
    
        rr.design('ReportDesign2');
        rr.run();
    
    }
    

See also

MorphX Reporting Tools