_BUILD_URL_ONSUBMIT_ Method

Outputs the geturl JavaScript function on the Dimensions page

Syntax

CALL SEND(OBJID,'_BUILD_URL_ONSUBMIT_',url);

Required Argument

url
the Application Broker component of the URL.
Type:Character

Details

This function runs when the View Report button is pressed. It builds the URL for the report request.

Example

Sample output:
function geturl(down,across,analysis) {
D0=0; A0=0; AC0=0; var href="../mddbapp.hlp/"; var stats="";
   param=new Object;
   param._SERVICE = "default";
   param._PROGRAM = "sashelp.webeis.showrpt.scl";
   param._DEBUG = "2";
   param.MDDB = "SASHELP.PRDMDDB";
   param.METABASE = "SASHELP";
   param.CSS="http%3A%2F%2Flocalhost%2Fcss%2Fmrv.css";
   param.GRT="NONE";
   param.DC="1";
   param.ACB="1";
   param.ST="1";

href = "/cgi-bin/broker.exe?";

   for (name in param) { href += name + "=" + param[name] + "&" }

href2="";

for (i=0; i<down.options.length; i++) {
   if (down.options[i].selected) {
      D0=eval(D0+1);
      href2+="&D" +D0 +"=" +down.options[i].value;
      if (eval(D0)==1) {
         href2+="&D" +"=" +down.options[i].value;
      }
   }
}
href+="D0=" +D0 +href2;

href2="";
for (i=0; i<across.options.length; i++) {
   if (across.options[i].selected && across.options[i].value!="") {
      AC0=eval(AC0+1);
      href2+="&AC" +AC0 +"=" +across.options[i].value;
      if (eval(AC0)==1) {
         href2+="&AC" +"=" +across.options[i].value;
      }
   }
}
href+="&AC0=" +AC0 +href2;

href2="";
for (i=0; i<analysis.options.length; i++) {
   if (analysis.options[i].selected) {
      A0=eval(A0+1);
      href2+="&A" +A0 +"=" +analysis.options[i].value;
      if (eval(A0)==1) {
         href2+="&A" +"=" +analysis.options[i].value;
      }
      stats=analysis.options[i].value+"STATS";
      statsarray=eval(stats);
      if (statsarray.length==1 && statsarray[0]=="nunique") {
         href2+="&A" +A0 +"S" +"=" +"NUNIQUE";
      }
      else if (statsarray.length==1 && statsarray[0]!="nunique") {
         href2+="&A" +A0 +"S" +"=" +"SUM";
      }
      else {
         if (statsarray.length == 2) {
            href2+="&A" + A0 + "S=" + statsarray[1];
         }
         else {
            for (j=1; j<statsarray.length; j++)
               href2+="&A" +A0 +"S" +j +"=" +statsarray[j];
            }
      }
   }
}
href+="&A0=" +A0 +href2;
return href;
}