Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Pass multi parameters to controller class (The wrong number of parameters are passed during object creation)

Posted on by 570

Hello ..

I have contract class with 3 parameters , i am using controller class to pass params to ssrs report

but i have a problem with multi parameters  (The wrong number of parameters are passed during object creation)  in debugging

class SrsRDPCalcAttTimeController extends SrsReportRunController
{
    SrsRDPContractCalcAttTime      contract;
    t_TmpTotalAttendance           tmp;
    //MonthOfYearId              mn;
    //e_VacBlnYear            yy;
    //HcmPersonnelNumberId_RU PersonnelNumber;
    t_Payroll   t_payroll;
}

//
public void new(t_Payroll    _t_payroll)
{

    t_payroll = _t_payroll;
}


//Modifies the contract before the dialog is shown to the user.
// place the code for modifying queries  before they are displayed in the dialog.
protected void prePromptModifyContract()
{
    contract    = this.parmReportContract().parmRdpContract() as SrsRDPContractCalcAttTime;
    contract.parmMonth(t_payroll.MN);
    contract.parmYear(t_payroll.YY);
    contract.parmPersonnelNumber(t_payroll.PNo);
}



public static client void main(Args    args)
{
    SrsRDPCalcAttTimeController            controler;


    controler   = new SrsRDPContractCalcAttTime(args.record());
    controler.parmArgs(args);
    controler.parmReportName(ssrsReportStr(Report31,CopyOfCopyOfPrecisionDesign1));
    controler.parmShowDialog(false);
    //controler.parmShowReportViewerParameters(false);
    controler.startOperation();
}



 the error displayed at (args.record());

thnaks

*This post is locked for comments

  • Ismail Mohamed Profile Picture
    Ismail Mohamed 570 on at
    RE: Pass multi parameters to controller class (The wrong number of parameters are passed during object creation)

    sorry i put contract instead controller in  

    controler   = new SrsRDPContractCalcAttTime(args.record());

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,219 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans