Skip to main content

Notifications

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

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!

  • Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    RE: enable or disable the text in report based on the menu item.

    Hi,

    Instead of waiting for exact answer, first try the solution said by the community people and let people know your result. Because few suggestions have only 1 design as your requirement. And if the solution doesn't work then we will try another design for you.

    So please let us know your results from our suggestions like Girish or me or Mohit.

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: enable or disable the text in report based on the menu item.

    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.

  • Suggested answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,552 Super User 2024 Season 1 on at
    RE: enable or disable the text in report based on the menu item.

    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

  • @rp@n Profile Picture
    @rp@n on at
    RE: enable or disable the text in report based on the menu item.

    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

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: enable or disable the text in report based on the menu item.

    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.

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,587 Super User 2024 Season 1 on at
    RE: enable or disable the text in report based on the menu item.

    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
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: enable or disable the text in report based on the menu item.

    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

  • @rp@n Profile Picture
    @rp@n on at
    RE: enable or disable the text in report based on the menu item.

    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
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: enable or disable the text in report based on the menu item.

    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
    @rp@n on at
    RE: enable or disable the text in report based on the menu item.

    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

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,836 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans