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

enable or disable the text in report based on the menu item.

(0) ShareShare
ReportReport
Posted on by 30

Hi team,

i have one SSRS report.  In this report in header I have added one text " Duplicate report".

This report is called from 2 diferent menu items. Original and Duplicate

When user click on Original then the text " Duplicate report " should not display in the report 

If they run the report from Duplicate menu item, than the text " Duplicate report" should display in the report.

Kindly let me know how we can enable or disbale the text in report based on the menu item.

Pls give me more shed on this.

thanks!

I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,829 Moderator on at

    Hi,

    I think you can't get the report output menu item in the report design.

    One suggestion will be creating name field on the report temp table and insert the report output menu item into the name field.

    In the report design you can enable or disable the text box based on that name field.

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    30 on at

    thanks Girish, almost i understood

    As you said,  "insert the report output menu item into the name field.

    In the report design you can enable or disable the text box based on that name field."

    Kindly send me the sample code pls

  • GirishS Profile Picture
    27,829 Moderator on at

    Assuming this is custom report.

    You can get the report menu item in the controller class only.

    So create one name parameter for storing the calling menu item and assign the value in the prePromptModifyContract method.

    In the dp class you can get the values from the contract class.

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    30 on at

    Hi Girish, the first suggestion will be the simple I guess . And this is standard report and needs to add the text only in the header.

    Kindly give me the sample code based on your first suggestion to enable or disable text.

    Pls give me more shed on this

  • GirishS Profile Picture
    27,829 Moderator on at

    Both my suggestions are interlinked. You need to follow both the suggestions.

    There is no sample code for this. Try to create them and if you stuck on any issues kindly let us know.

    Thanks,

    Girish S

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

    For 1 menu item, create extension, call your new controller which will call report with duplicate named text in the report. For the other menu item no change is required.

  • GirishS Profile Picture
    27,829 Moderator on at

    To make it more simple create 2 design one with original text box and another with duplicate text box.

    Call the respective design on the controller class based on the menu item.

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    30 on at

    Hi Girish,

    They asked me to change in the existing design only. Not to create duplicate.

    That particular text should enabled or disabled based on menu item. Thst is the requirement

  • Suggested answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi, I haven't tested it but can you try to find menuitem in main method of controller class as mentioned in the below article. If you can find it, then you can manipulate textbox based on caller menu items.

    www.dynamicsuser.net/.../65911

  • GirishS Profile Picture
    27,829 Moderator on at

    Hi,

    Then you need to create one parm method in contract class- Pass the value in prePromptModifyContract method with the caller menu item.

    Get that parm menu item on the dp class and insert the value into the temp table.

    Thanks,

    Girish S.

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

News and Announcements

Season of Giving Solutions is Here!

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 836 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 349 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans