Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Check the menuitemoutput name to change the design in SSRS report

(1) ShareShare
ReportReport
Posted on by 750
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

 

  • Layan Jwei Profile Picture
    Layan Jwei 7,340 Super User 2024 Season 2 on at
    Check the menuitemoutput name to change the design in SSRS report
    Hi Hisham,
     
    Do you still need help?
  • Mohit Rampal Profile Picture
    Mohit Rampal 12,550 Super User 2024 Season 1 on at
    Check the menuitemoutput name to change the design in SSRS report
  • Suggested answer
    Layan Jwei Profile Picture
    Layan Jwei 7,340 Super User 2024 Season 2 on at
    Check the menuitemoutput name to change the design in SSRS report
    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
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 11,560 Super User 2024 Season 2 on at
    Check the menuitemoutput name to change the design in SSRS report
     
    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

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,569 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans