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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Print multiple SSRS report from grid multiple lines

(0) ShareShare
ReportReport
Posted on by

Hi..having trouble printing multiple reports from grid. 
1. I have set the menuitembutton and the menuitem multiselect = yes.
2. I have entered the following code into the menuitembuttons\clicked

void clicked()
{
    //super();
    Table Buffer;
    MenuFunction mf;
    args args;

    for (Buffer=Table_ds.getFirst(true) ?Table_ds.getFirst(true) :Table_ds.cursor(); Buffer;Buffer= Table_ds.getnext())
    {
        args = new Args();
        args.record(Buffer);
        mf = new menufunction(identifierstr(ReportMenuItem), MenuItemType::Output);
        mf.run(args);
    }
    
}


Please advise. Much appreciated!
 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    It did print all the selected reports, but the report viewer only show one report, and it only shows the next report after I closed the current one.

  • Dan Emreus Profile Picture
    1,162 on at

    Hi Gary

    Maybe a stupid question, but are you sure that the reports is not acually printed but they are on top of each other and therefor it looks like they are not printed at the same time?

    /Dan

  • Community Member Profile Picture
    on at

    Hi Dan
    No sir. Only one report viewer showed up. When I closed it, only then the next report viewer shows. 

  • Suggested answer
    Anton Venter Profile Picture
    20,345 Super User 2025 Season 2 on at

    It is possible to bypass the report's dialog. The menu function method you are using opens the report dialog by default. have a look at Martin's blog article here: dev.goshoom.net/.../printing-reports-from-code-in-ax2012

  • Dan Emreus Profile Picture
    1,162 on at

    I have tried you code and it work like a charm for me. So I am not sure why you are having problems.

    /Dan

  • Community Member Profile Picture
    on at

    Your reports showed in one report viewer?

  • Community Member Profile Picture
    on at

    did you mean, parameter dialog? it was set to false in the report controller class.  

    tried martin's method, but it did not work to my requirements.

  • Community Member Profile Picture
    on at

    Hi Gary,

    Dominic has provided a solution to this. I faced a similar issue and his solution helped me.

    Hope it will solve your problem too. I am providing the link below.
    Kindly verify and confirm if it solves your issue.

    community.dynamics.com/.../ax2012-print-multiple-reports-to-screen-at-the-same-time.aspx

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans