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

Announcements

News and Announcements icon
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,811 Super User 2026 Season 1 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,282 Super User 2026 Season 1 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,573 Moderator on at
  • Layan Jwei Profile Picture
    8,282 Super User 2026 Season 1 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 382 Super User 2026 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 265 Most Valuable Professional

#3
Subra Profile Picture

Subra 262

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans