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)

change the title of the parameter dialog (SSRS report)

(0) ShareShare
ReportReport
Posted on by
I want to change the title of the parameter dialog  
according to the calling menu item.
I tried this code in the method " Main" the controller
but it did not work for me...

if(_args.menuItemName() == menuitemoutputstr(menuitem1))

{

       controller.parmDialogCaption("caption1");

      

}

else

{

controller.parmDialogCaption("caption2");

 

}

 

 Regards,

*This post is locked for comments

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

    The framework is already able to use the label of the calling menu item. You just mustn't forget to set args (parmArgs()) of the controller class.

    If you're interested in implementation details, look into SysOperationController.parmDialogCaption().

  • Community Member Profile Picture
    on at

    thank you for your reply,

    I have set args (parmArgs()) of the controller class, but still same problem.

    The system keeps the title of first menu item used to load the report

    Scenario :

    1- click on «menu item A » without loading the report, just display parameters dialog => the correct title is displayed

    2- click on «menu item B » without loading the report, just display parameters dialog => the correct title is displayed

    3- click on «menu item A » AND loading the report => the correct title is displayed

    4- click on «menu item B » =>   Instead of displaying the title of " menu item B ", title of " menu item A” is displayed

    Regards,

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    Use the debugger to understand what happens in your code. Either the title is cached or it's set in code in some other place.

  • Suggested answer
    syed baber Profile Picture
    11,633 on at

    Hi Kima,

    Try to clear the usage data and cache from Tools -> Caches option and then see if it resolves your issue.

    Thanks,

    Baber.

  • Community Member Profile Picture
    on at

    Hi Baber,

    I have run the incremental CIL , Reset usage data and clear cache, but still same problem !

  • Verified answer
    Community Member Profile Picture
    on at

    Hi,

    I created a new controller and it works :)

  • Safeer PS Profile Picture
    507 on at

    Dear Kima,

    I dont know why you need controller calss itself. You can change title of dialog and report by changing label of menu item of the report.

  • Martin Dráb Profile Picture
    237,801 Most Valuable Professional on at

    There always is a controller; but you're right that the default controller is able to use the title from meu item. That's what I mentioned in my first reply in this thread, where I also said what's needed in custom controllers to make this work (= passing arguments to parmArgs()).

  • DiepBH Profile Picture
    115 on at

    I found solution:

    in UIBuilder:

    public void postRun()

       {

           Dialog dialogLocal = this.dialog();

           dialogLocal.dialogForm().formRun().controlMethodOverload(false);

           dialogFieldReportEnum = this.bindInfo().getDialogField(this.dataContractObject(), methodStr(FSO_VAS_C_BankDepositCURContract, parmReportEnum));

           if(dialogFieldReportEnum != null)

           {

               dialogFieldReportEnum.visible(false);

               switch(dialogFieldReportEnum.value())

               {

                   case FSO_VAS_B_ReportEnum::BankDeposit:

                       dialogLocal.dialogForm().formRun().design().caption('Sổ tiền gửi ngân hàng theo ngoại tệ');

                       break;

                   case FSO_VAS_B_ReportEnum::CashBookBank:

                       dialogLocal.dialogForm().formRun().design().caption('Sổ quỹ tiền mặt theo ngoại tệ (Bank account)');

                       break;

                   case FSO_VAS_B_ReportEnum::CashBookMain:

                       dialogLocal.dialogForm().formRun().design().caption('Sổ quỹ tiền mặt theo ngoại tệ (Main account)');

                       break;

               }

           }

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans