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)

"Report menu item is not found when constructing the query string" when printing to screen.

(0) ShareShare
ReportReport
Posted on by

Hello,

I am trying to print a SSRS report to the screen through a controller class of my own. I call a menu item that refers to my Controller class.

Error: "Report menu item is not found when constructing the query string"

I have tracked down where the error is being thrown (See the callstack).

The parmReportContract function is being called multiple times, but it only breaks with this callstack, when the ReportContract is returned,  the data in it is valid, I've compared the data in the contract while printing the same report by bypassing my own controller class (no error when bypassing my class).

So it seems to me that I might need to set some extra data in my controller/contract?

Let me know if you need more info. 

> Dynamics.AX.ApplicationFoundation.Class.SrsReportRunController.netmodule!Dynamics.AX.Application.SrsReportRunController.parmReportContract(Dynamics.AX.Application.SrsReportDataContract _reportContract, bool @_reportContract_IsDefaultSet) Line 527 X++
[External Code]
Dynamics.AX.ApplicationFoundation.Class.SrsReportRunController.netmodule!Dynamics.AX.Application.SrsReportRunController.runToScreen() Line 1236 X++
Dynamics.AX.ApplicationFoundation.Class.SrsReportRunController.netmodule!Dynamics.AX.Application.SrsReportRunController.doReportRun() Line 1145 X++
Dynamics.AX.ApplicationFoundation.Class.SrsReportRunController.netmodule!Dynamics.AX.Application.SrsReportRunController.runReport() Line 1093 X++
Dynamics.AX.ApplicationFoundation.Class.SrsReportRunController.netmodule!Dynamics.AX.Application.SrsReportRunController.run() Line 1062 X++

*This post is locked for comments

I have the same question (0)
  • Jan M. Profile Picture
    3,233 on at
    RE: "Report menu item is not found when constructing the query string" when printing to screen.

    Hi

    Did you find a solution?

    We have next to this error also reports with "printer settings not found" error. New deployment does not help.

    The reports are running with 2012 and was migrated to D365. What are the differences now in D365?

    Is a job who starts a report different with D365?

    Thanks for help!

  • Jan M. Profile Picture
    3,233 on at
    RE: "Report menu item is not found when constructing the query string" when printing to screen.

    The error "Report menu item is not found when constructing the query string" can be fixed with args param:

    _args.menuItemName(identifierStr(yourMenuItem));

    _args.menuItemType(MenuItemType::Output);

    see: support.microsoft.com/.../4013980

    Other problems like print settings not found are still open.

  • faheem Ahmed Profile Picture
    450 on at
    RE: "Report menu item is not found when constructing the query string" when printing to screen.

    Args _args = new Args();

    _args.menuItemType(MenuItemType::Output);
    _args.menuItemName(identifierStr(YourMenuItemName));
    controller.parmArgs(_args);

    This will resolve this error

    but report is still not accepting parameter value although when i debug the code data is passed to parameter.

    any idea?

  • Emre Ceylan Profile Picture
    5 on at
    RE: "Report menu item is not found when constructing the query string" when printing to screen.

    Hi,

    I agree to Faheem. But, If you use controller class you must add following code.

    "controller.parmArgs(_args)"

    I has given same error and added this code. The problem was solved.

  • keyur123 Profile Picture
    5 on at
    RE: "Report menu item is not found when constructing the query string" when printing to screen.

    Yes using controller.parmArgs(_args) the error is gone but data is not coming in report, does anyone has solution for this?

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
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Community Member Profile Picture

Community Member 2

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans