Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

First time reports are opening with default values instead of passed values from my application

Question
1
Views
0
Comments
arpit
arpit Rank 1 - Community Starter

Unchecked ‘Allow Guest Access’ and passed Administrator id & password via url, used post method to call BI.

Report is opened with default parameters instead of passed parameters.

Note - With get method report is opening with passed parameters not default parameters.

First time Reports are opened with default parameters instead of passed parameters.

Seconf time onward Reports are opened with passed parameters.

Cmd = rundll32 url.dll,FileProtocolHandler "http://localhost:8080/jedi/showReport.rpt?URL=http://localhost:8180/xmlpserver/Guest/GTMReports/Account%20Detail%20Report/Account%20Detail%20Report.xdo&_xpf=&_xpt=0&_xdo=%2FGuest%2FGTMReports/Account+Detail+Report%2FAccount+Detail+Report.xdo&_xt=Account+Detail&_xf=pdf&host=localhost:8180&GasDay=2017-03-01T09:00:00.0&BeginDate=2017-03-01T09:00:00.0&EndDate=2017-03-02T09:00:00.0&Facility=<IntegerDataCollection><integer>1313</integer></IntegerDataCollection>&LegalEntity=1608&InvAcct=8880&IA=00093-00_Natural Gas&ContractId=44083&invAssn=false&FacilityName=APT&token=925165285"

Process p = Runtime.getRuntime().exec(cmd);

http://localhost:8080/jedi/showReport.rpt url is mapped with my JSP.

Added BI user id in JSP

<%@ page import="java.util.*"%>

<html>

<head>

<script language="javascript" type="text/javascript">

function addHiddenParameters(paramName,paramValue) {

       var hiddenParam = document.createElement('input');

       hiddenParam.setAttribute('type', 'hidden');

       hiddenParam.setAttribute('name', paramName);

       hiddenParam.setAttribute('id', paramName);

       hiddenParam.setAttribute('value', paramValue);

       document.showReport.appendChild(hiddenParam);

}

function createHiddenParameters()

{

       <%String paramName = "";

       String paramValue = "";

       for(Enumeration e = request.getParameterNames();e.hasMoreElements();)

       {

              paramName = (String)e.nextElement();

              paramValue = request.getParameter(paramName);

              if(!"URL".equals(paramName))

              {%>  

                     addHiddenParameters('<%=paramName%>','<%=paramValue%>')

              <%}

       }

       paramName = "id";

       paramValue = com.altra.common.FactoryOverrides.getProperty("xmlpserverUserId");

       %>

       addHiddenParameters('<%=paramName%>','<%=paramValue%>')

     

       <%  paramName = "passwd";

              paramValue = com.altra.common.FactoryOverrides.getProperty("xmlpserverPassword");

       %>

       addHiddenParameters('<%=paramName%>','<%=paramValue%>')

}

function viewReport()

{

       createHiddenParameters();

       document.showReport.action='<%=request.getParameter("URL")%>';

       document.showReport.submit();   

}

</script>

</head>

<body onLoad="viewReport()">

       <form name="showReport" method="post" action=""></form>

</body>

</html>