on 08-21-2014 3:04 PM
Hi Experts,
I am done with a single doc link in jsp file ,now my requirement is to use a single jsp file for multiple docs.
Like I have 10 WEBI reports and I want to open it from separate application without passing BO user name and password .Can I achive it with a single JSP.
Please advice how to do it.
Hi Vikas,
You can use something like the below code
===================================
<%@ page import="com.crystaldecisions.sdk.framework.CrystalEnterprise" %>
<%@ page import="com.crystaldecisions.sdk.framework.IEnterpriseSession" %>
<%@ page import="com.crystaldecisions.sdk.framework.ISessionMgr" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.IInfoStore" %>
<%@ page import="com.crystaldecisions.sdk.occa.security.ILogonTokenMgr"%>
<%@ page import = "com.crystaldecisions.sdk.framework.*"%>
<%@ page import = "com.crystaldecisions.sdk.properties.*" %>
<%@ page import = "com.crystaldecisions.sdk.framework.*" %>
<%@ page import = "java.util.*" %>
<html>
<body>
<%
IEnterpriseSession eSession = null;
try
{
String CMS = "cmsname";
String username = "username";
String password= "password";
String Auth = "secEnterprise";
ISessionMgr sessionMgr = CrystalEnterprise.getSessionMgr();
eSession = sessionMgr.logon(username,password,CMS,Auth)
ILogonTokenMgr logonTokenMgr = eSession.getLogonTokenMgr();
String defaultToken = logonTokenMgr.getDefaultToken();
String open = "http://localhost:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=AZQxKFpLb2JDqfKNxVI_10g&sIDType=C...;
String open1 ="http://localhost:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=AUGC0aj3IsdDngyQfsguyjw&sIDType=C...;
String open2 ="http://localhost:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=AXDEPU6w1J1Bgp69rr7Ir0c&sIDType=C...;
String open3 ="http://localhost:8080/OpenDocument/opendoc/openDocument.jsp?iDocID=ATL0N_2D8JNDmx.DblcXoMM&sIDType=C...;
%>
<div align="center">
<b>Open Document Sample Application</b>
</div>
<br />
<br />
<b>Select Reports List:</b><br />
<br />
<a href = "<%= open %>" target= "myframe">Report1</a><br />
<a href = "<%= open1 %>" target= "myframe">Report2</a><br />
<a href = "<%= open2 %>" target= "myframe">Report3</a><br />
<a href = "<%= open3 %>" target= "myframe">Report4</a> <br />
<iframe src="" name="myframe" width="900" height="500" align="center">
</iframe>
<%
out.println("<br />");
}
catch(Exception e)
{
out.println(e.getMessage());
}
%>
</body>
</html>
================================================
Thanks,
Prithvi
Message was edited by: Prithviraj Shekhawat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.