Book Image

Microsoft Dynamics AX 2012 R3 Reporting Cookbook Update

Book Image

Microsoft Dynamics AX 2012 R3 Reporting Cookbook Update

Overview of this book

Table of Contents (17 chapters)
Microsoft Dynamics AX 2012 R3 Reporting Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Calling multiple reports from a controller


A single controller can be used to invoke multiple reports. This recipe will discuss how to use the same controller for different reports and the security set up for multiple reports from a single controller.

How to do it…

  1. Here we have modified our method to choose two different reports: one developed in Chapter 2, Enhancing Your Report – Visualization and Interaction and the other from the current chapter. In this we will invoke the multiple reports using the single controller:

    public static void main(Args args)
    {
        PktRdlItemTransController controller;
    
        controller = new PktRdlItemTransController();
        if (args && args.record())
        {
            switch (args.record().TableId)            
            {
                case tableNum(InventTable)):controller.parmReportName(ssrsReportStr(PktRdlItemTransList, ItemTransList));  
                    break;
                case tableNum(CustGroup)):controller.parmReportName(ssrsReportStr(PktItemTransList, TransList...