Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Open multiple instances of Report at same time

Sohaib Cheema Profile Picture Sohaib Cheema 46,614 User Group Leader

Summary:-

Many times it is needed to display multiple reports on screen. In standard Dynamics AX 2012, if you try to call multiple times, a report; it will open 2nd report, after 1st instance of report viewer is closed. A user may be looking for, display of multiple instances at same time, without closing other.

 

Resolution/Solution:

To achieve this we need to override dialogShow() on Controller Class.

Below is the example code

 

protected void dialogShow()
{
        SysOperationDialog sysOperationDialog;
        FormRun formRun;

        dialog.run();
        this.dialogPostRun();

        // Get formrun and detach the formrun object, so not blocking.
        sysOperationDialog = dialog as SysOperationDialog;
        formRun = sysOperationDialog.formRun();
        formRun.detach();
}


 

In addition also override dialogClose() and remove super() call

protected void dialogClose()
{
    //super();
}


References:

https://msdn.microsoft.com/en-us/library/srsprintmgmtcontroller.dialogshow.aspx

 

 

Comments

*This post is locked for comments

  • Goldie Profile Picture Goldie 189
    Posted at
    Hi Sohaib, I added dialogclose() and dialogshow() method exactly as you did, however in this case i dont get any report, just parameter form from contract class and then nothing.
  • Sohaib Cheema Profile Picture Sohaib Cheema 46,614 User Group Leader
    Posted at

    Hi Ashi_DynamicsAX,

    how are you posting your order? line by line or full order in a single shot?

  • Community Member Profile Picture Community Member
    Posted at

    Could you please suggest can i generate multiple reports for each sales line of sales order if so please suggest how can i do.

    Thanks in advance

  • Sohaib Cheema Profile Picture Sohaib Cheema 46,614 User Group Leader
    Posted at

    @kartik0603  

    As of today, its not possible to open same report multiple time, within same report viewer instance. For dynamics ax single instance of report viewer is opened for each report call. In AX, its possible to open multiple instances of report viewer without closing  previous instances.

  • kartik0603 Profile Picture kartik0603 239
    Posted at

    Is it possible to display multiple copies of report  in same report viewer...