Adding Report Button on Opportunity Pipeline using JAVASCRIPT

By | September 6, 2016

As, we all are familiar with the Reports module provided by SAGE CRM. We can fetch the required report by navigating to respective Report Category.  Here, I will explain how we can run a report that is regularly in use without navigating to Report Category and finding the same all over.

New Stuff: Setting Time Zone configurations in Sage CRM at user level as well as at system level

We can achieve this with the help of Report ID which needs to be a part of JAVASCRIPT code. Consider an example of Opportunity Pipeline screen on MY CRM. We can provide a button which will extract a particular report in pdf format.

Step 1:
1. Navigate to Administration | Advanced Customization | Button Groups.
2. Create new button group and add a button in that as shown in the below screenshots.



Step 2:
Put the following code in your Custom Page and call the RunReport() function in On Load event function.
function RunReport()
var strPath = document.URL;
var arrayApp = strPath.split(“/Do?”);
var intReportID = 78 // ID for “Currently Open Opportunities” report
var intReportAction = 1411;
var strDestination = “Adobe”;
var strURL = arrayApp[0] +”/Do?SID=”+GetKeyValue(“SID”)+”&Act=”;
strURL += intReportAction+GetKeys()+”&Key41=”+intReportID+”&FlgNewWindow= True&Destination=”;
strURL += strDestination+”&PageSize=210×297&Orientation=Landscape”;
function GetKeyValue(querystringname)
var strPath =;
var arrayKeys = strPath.split(“&”);
for (var i=0;i<arrayKeys.length;i++)
var arrayValue = arrayKeys[i].split(“=”);
if (arrayValue[0].toLowerCase()== querystringname.toLowerCase())
return arrayValue[1];
return “”;
function popUp(URL)
day = new Date();
id = day.getTime();, id , ‘toolbar=0 , scrollbars=0, location=0, statusbar=0, menubar=0 , resizable=0, width=600, height=400, left = 340, top = 200’);
Step 3:
Put Custom Page path in Custom Content box of “Opportunity Grid”.
Step 4:
Move to Opportunity Pipeline, you will able to see the “Report” button. On clicking the same, the report i.e. My Currently Open Opportunities will open in pop-up window with pdf format.



Also Read:
1. Display Report Chart and Grid on same page
2. How to set the background Color of Fusion Chart Report
3. How to Edit Summary Report
4. Hiding Report Category for Specific Time
5. Access Rights to create new Reports in Sage CRM