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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Check the menuitemoutput name to change the design in SSRS report

(1) ShareShare
ReportReport
Posted on by 756
Hi everyone,
 

I'm currently working on modifying the layout in the UIbuilder class to show/hide certain controls based on the menutitemoutput name. Additionally, I need to implement functionality to switch between different SSRS report designs called in the controller class.

Could you please provide guidance or share a snippet of code demonstrating how I can achieve these tasks?

Thank you for your assistance.

H

 

I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,765 Super User 2025 Season 2 on at
     
    In controller class you must add condition in main method.
     
    e.g.
     
    public static void main(Args _args)
    {
        YourController controller = new YourController ();
        if(_args.menuItemName == menuItemOutputStr(FirstOutputMenuItem)
        {
        controller.parmReportName(ssrsReportStr(YourReport, Report1));
        }
        else
        {
        controller.parmReportName(ssrsReportStr(YourReport, Report2));
        }
        controller.parmArgs(_args);
        controller.parmDialogCaption("Caption");
        controller.startOperation();
    }
    Best regards,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    Layan Jwei Profile Picture
    8,165 Super User 2025 Season 2 on at
    Hi Hisham,


    if let's say you have two designs. Maybe you can add a hidden boolean contract parameter:  isReportDesign1()

    And in the controller class, you can fill this parameter by checking _args.MenuItemName()

    now in the uiBuilder you can access the contract class and hide or show controls based on the contract parameter

    OR I think you can do that check in the UIBuilder directly, by using this line of code if(this.controller().parmArgs().menuItemName() == yourMenuitem) then hide or show controls

    Thanks,
    Layan Jweihan
    Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
  • Mohit Rampal Profile Picture
    12,565 Moderator on at
  • Layan Jwei Profile Picture
    8,165 Super User 2025 Season 2 on at
    Hi Hisham,
     
    Do you still need help?

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 629 Super User 2025 Season 2

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 444 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 288 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans