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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Passing menu item name as a parameter

(0) ShareShare
ReportReport
Posted on by

Hello,

I would like to pass menu item name that is clicked when the report is started.

I figured I could do it with creating a member in contract class that represents menu item name.

[DataMemberAttribute('menuf')]
public Name parmMenuf(Name _menuf = menuf)
{
menuf = _menuf;
return menuf;
}

After that, i assigned a value in prePromptModifyContract with:

contract.parmMenuf(args.menuItemName());

When I debug the controller class, I see a value assigned, but it is not passed to my RDP class. Also, when I run the report, it says this parameter is missing a value.

I restarted Reporting Services and AOS, and also did a incr. CIL

Is there maybe a different way to pass the name of the menu item that is clicked to the RDP class?

Thank You!

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Passing menu item name as a parameter

    I did that, and when I run the report, I get an error that this parameter holding the menu item name is missing the value.

    If i do this in my RDP class

    menuitem        = contract.parmMenuf();

    throw error(menuitem);

    I get the following error

    (S)\Classes\xInfo\add

    (S)\Classes\Info\add - line 94

    (S)\Classes\Global\error - line 3

    (S)\Classes\CustCollLetterJourDP\insertTmpCustCollectionLetterJour - line 37

    (S)\Classes\CustCollLetterJourDP\processReport - line 4

    (S)\Classes\SrsReportProviderQueryBuilder\initialize - line 59

    (S)\Jobs\

    instead just getting the menu item name.

    When I write a job and manually assign values to the contract, its working.

  • Hariharans87 Profile Picture
    3 on at
    RE: Passing menu item name as a parameter

    Try to refresh the dataset in SSRS and make sure that new parameter is added in the SSRS report parameter node section.

    For "parameter is missing a value" error message, please refer the below link.

    blogs.msdn.microsoft.com/.../parameter-is-missing-a-value-error-running-a-customized-report-in-microsoft-dynamics-ax-2012

    "When I write a job and manually assign values to the contract, its working." means could you see your menu name in the report?

  • Community Member Profile Picture
    on at
    RE: Passing menu item name as a parameter

    Full CIL solved the issue for me.

    Thank You for 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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 4

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#3
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans