Open multiple instances of Report at same time
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
-
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.
-
Hi Ashi_DynamicsAX,
how are you posting your order? line by line or full order in a single shot?
-
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
-
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.
-

Like
Report
*This post is locked for comments