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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

run ssrs report with two design

(0) ShareShare
ReportReport
Posted on by

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,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,878 Most Valuable Professional on at

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

  • AX 2012 r3 Profile Picture
    2,426 on at

    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
    Chaitanya Golla Profile Picture
    17,225 on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans