Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

run ssrs report with two design

Posted on by Microsoft Employee

I have rdp class that has two temp table, in process in rdp class i want to run specific function based on design in menu item and another function based on another design.

how to do this??

Regards,

  • Suggested answer
    Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: run ssrs report with two design

    Hi Mostafa,

    There are several ways to accomplish this. I would recommend to introduce a parameter on the datacontract class(as Martin suggested) and mark the parameter to yes/no based on the report name in the controller class

    (by overriding the getFromDialog() method and include following code).  In the DP class access these value from the contract class and invoke your function accordingly.

    public void getFromDialog()

    {

       Contractclass statementContract; //Intialize contract class

       super();

       statementContract = this.getReportContract().parmRdpContract() as Contractclass;

       if (this.parmReportName() == #ReportName)

       {

           statementContract.parmvalue(); // parameter on the contract class

       }

    }

    Hope this helps you.

    Thanks,

    Chaitanya Golla

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: run ssrs report with two design

    Hi,

    1.First Define the contract parameters

    2.retrieve in RDP class

    3.write condition in DP class like

    if(Function1)

    {

    this.insertintotmptable1();

    SrsReportRunController  controller;

      controller = new SrsReportRunController();

      controller.parmReportName(ssrsReportStr(Report, Design1));

      controller.startOperation();

    }

    else if(Function2)

    {

    this.insertintotmptable2();

    SrsReportRunController  controller;

      controller = new SrsReportRunController();

      controller.parmReportName(ssrsReportStr(Report, Design2));

      controller.startOperation();

    }

    If this is not your solution

    Please check this example

    Create controller class

    Ex :- RetailLabelController.ParmreportName()

    Regards.

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 224,528 Super User on at
    RE: run ssrs report with two design

    Put the parameter to the data contract class when calling the report. The RDP class with later get it it the parameter of processReport().

Helpful resources

Quick Links

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,632 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,528 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans