Report output generation in new tab


Problem Statement:

ADempiere has very good reporting framework. It has in built print formats and it supports third party jasper integration. But while executing these reports once user pass input parameters and say ok, report input parameter tab will disappear and report out will appear in same tab. If User want to generate report once again by passing different values to Report, User has to re-open Report/Print Format once again. It will create inconvenience to User to generate the reports couple of time. Application should have flexibility to give chance to User that Reports can be generated any no of number times without re-opening the corresponding report.

Through minor customization ADempiere can have this behavior.

Scope of Article:

As a part of this Article, We will be covering Jasper Reports and Print Formats generation in new Tab related instead of generating them in same Tab.

Technology :

ADempiere 342 or above

Current Behavior :

  1. Run Journal Voucher Details jasper report and verify the Report generation Tab.1
  2. Clicked on Start button, then report is generated in same Tab.2
  3. Also check current behavior of the Print Formats by generating Aging report.3
  4. Aging report also generated in same Tab.4

Instead of generating reports in same Tab, it is good to generate reports in separate Tab. So that User can run report couple of times by changing input parameters values without opening same report again and again.

Changes Details :

To achieve this behavior, We need to make code changes org.adempiere.webui.apps.ProcessDialog.java file to open report output in new Tab.

Add following code changes in unlockUI(ProcessInfo pi) method of  ProcessDialog.java file to generate report in new Tab.

public void unlockUI(ProcessInfo pi) {
-----
// Added if condition to check If it is process then only it should update current Window
// If it is Report then need not to update the current window
if(!m_IsReport || pi.isError())
{
updateUI(pi);
}
-----
}

Delete following code in onAfterProcess() method of ProcessDialog.java file

// Close automatically
 if (m_IsReport && !m_pi.isError())
 this.dispose();
 // If the process is a silent one and no errors occured, close the dialog
 if(m_ShowHelp != null && m_ShowHelp.equals("S"))
 this.dispose();

DB Changes :

Run following script to set IsReport to true of all Jasper Reports.

Update ad_process set  isreport = 'Y' Where jasperreport is not null;

After applying above changes, clean and start application and run the same reports then check whether reports are generated in same Tab or new Tab.

  • Journal Voucher Details report has been generated in New Tab.5
  • Print Formats are also generated in new Tab. Look at following Aging report, it is generated in new Tab.6Now reports are generated in separate Tab.

Summary:

As a part of this article we come to know what are the necessary changes need to do to generate reports in separate Tab instead of generating them in same Tab. Hope you have enjoyed reading this article.

Walking Tree promotes ADempiere and we support the users as well as the developers to ensure that the business is able to take complete advantage of ADempiere’s wonderful capability. In case you are looking for a professional assistance then do visit our website to get in touch with us.

 References :

Posted in ADempiere, EagleRP

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

We Have Moved Our Blog!

We have moved our blog to our company site. Check out https://walkingtree.tech/index.php/blog for all latest blogs.

Sencha Select Partner Sencha Training Partner
Xamarin Authorized Partner
Recent Publication
%d bloggers like this: