[Hacking WebI] Customize “No data to retrieve” message
When there is no record fetched in a WebI query, we get the message like “No data to retrieve in <Data Provider>”. I have seen multiple times people asking for a way to customize this message or prevent the message from appearing. There is a blog in SCN which describes a way to do it for WebI on universe. But, for WebI on OLAP connection, the need remains.
In this blog, let me share the way I managed to do it.
|This customization is not supported by SAP. There is no guarantee that this approach will work in future releases of the product.|
|This is going to affect all WebI reports.|
This process has been tested in SAP BO BI Platform 4.1 SP5 installed in Windows server with Tomcat as application server. Product Locale & Preferred Viewing Locale is English (en_US).
- Stop Tomcat.
- Delete the folder <Tomcat Installation Dir>\work\Catalina\localhost\BOE. This is a temporary folder and will be re-created once we start tomcat.
- Navigate to <Tomcat Installation Dir>\webapps\BOE\WEB-INF\eclipse\plugins\webpath.AnalyticalReporting\web\webiDHTML\viewer\language\en\scripts.
- Take a backup of the file viewPerspective.js and keep it in a safe location.
- Open the file in notepad and search for the string displayNoDataToFetch.
- Change the function definition to set your custom message.
showAlertDialog(“No data to retrieve in “+s,”Retrieving Data”,0,cb);
showAlertDialog(“No data to fetch in “+s,”Retrieving Data”,0,cb);
Prevent the message from appearing
/* showAlertDialog(“No data to retrieve in “+s,”Retrieving Data”,0,cb); */
- Save the file.
- Start Tomcat.
- Clear browser cache.
- Wait till the temporary BOE folder is fully re-created in <Tomcat Installation Dir>\work\Catalina\localhost folder.
- Test by running a WebI report from BI Launchpad in HTML view which has no data to retrieve.
- Here is the customized message :