Friday, November 27, 2015

Launching parallel SSRS reports on screen

Recently I came across a requirement where one of our customer does not want the Check transaction to take another check page, if the number of settlements marked on Payment Journal lines exceeds the number which can be accommodated in single page. They wish to launch the details of transactions on separate report in parallel to check. However, we all know that SSRS report viewer in AX is launched as Dialog in default and hence it requires some modifications in controller class in order to avoid code blocking if any parallel report dialog is launched within report DP class.

In order to get rid of Dialog functionality of SSRS report viewer, see the following code below:

Override the "dialogShow" function in controller class

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

                dialog.run();
                  this.dialogPostRun();
                    sysOperationDialog = dialog as SysOperationDialog;
                      formRun = sysOperationDialog.formRun();

                          formRun.detach();
                        }

                        Override the "dialogClose" function in controller class

                        protected void dialogClose()
                        {
                            //super();
                        }
                              That's all what you need :)