集成dashboard

SAP Knowledge Base Article

Symptom
A dashboard has been created and published to the BI4 Platform.
Requirement is to embed the dash board into a web page calling the dashboard from the BI4 Platform

Environment
SAP BusinessObjects Business Intelligence 4 Platform
Dashboards 4

Resolution
Embedding a Dashboard swf file into a web page is possible using the downloadDocument call from the SDK. It is possible to create a
LogonToken to create a session in the BI4 platform and call any dashboard swf file by executing the web page URL in a brower.

Steps:
a) Log into the BI 4 Platform's CMC.
b) Navigate to the folder containing your dashboard.
c) Right click on the dashboard name and select the "Properties" option.
d) Copy the CUID from the properties displayed. Note: The CUID is displayed next to the ID number.
e) Edit the sample jsp code attached and supply the credentials that will be used to create an Enterprise session.
f) Enter the CUID for the dashboard to be opened.
g) Deploy the jsp file to the JAVA web application server.


<------ Sample Code------->
<%@ page import="com.crystaldecisions.sdk.exception.SDKException,
com.crystaldecisions.sdk.framework.*,
com.crystaldecisions.sdk.occa.infostore.*,
com.crystaldecisions.sdk.occa.security.*,
java.net.*,
com.crystaldecisions.Enterprise.*,
com.crystaldecisions.sdk.plugin.admin.*"
%>
<%@ page import="java.sql.*"%>
<%@ page isErrorPage="true" import="java.io.*" %>
<%
//Set parameters for session
SDKException failure = null;
String Flashvars="";
IEnterpriseSession enterpriseSession=null;
String myServer = "localhost";
String userName = "administrator";
String myPassword = "changeMe";
String myAuth = "secEnterprise";
String myiDocID = "ATr9585FEGxPjcaoA_.lTUk";
try{
try {
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(userName,myPassword,myServer,myAuth);
}
catch (SDKException error) {
failure = error;
}
if (failure != null)
{
out.println(failure);
}
else
{ session.setAttribute("CE_Session", enterpriseSession);
}
String defaultToken = enterpriseSession.getLogonTokenMgr().createLogonToken("",120,100);
String tokenEncode = URLEncoder.encode(defaultToken, "UTF-8");
1736617 - How to embed a BI4 Published Dashboard swf file into a web page
Version 1 Validity: 29.06.2012 - active Language English

//Optionally, pass flashvars see second embeded swf
Flashvars="CELogonToken=" + tokenEncode;
Flashvars += "&Par1=new1&Par2=new2&Par3=new3";
}
catch (Exception e)
{}
%>
<HTML>
<TITLE>Dashboards</TITLE>
</HEAD>
<BODY>
Main
<br/>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
WIDTH="800" HEIGHT="400" id="main">
<PARAM NAME="movie" VALUE="http://localhost:8080/BOE/Xcelsius/opendoc/documentDownload?iDocID=<%=myiDocID%
>&sIDType=CUID&CELogonToken=A1">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="bgcolor" VALUE="#FFFFFF">
<PARAM NAME=bgcolor VALUE="#FFFFFF">
<EMBED src="Parent_Dashboard.swf" quality=high bgcolor=#FFFFFF WIDTH="1329" HEIGHT="747"
NAME="main" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
<br/>
Passing flashvars
<br/>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
WIDTH="1329" HEIGHT="400" id="main">
<PARAM NAME="movie" VALUE="http://localhost:8080/BOE/Xcelsius/opendoc/documentDownload?
iDocID=ATr9585FEGxPjcaoA_.lTUk&sIDType=CUID&CELogonToken=A1">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="bgcolor" VALUE="#FFFFFF">
<PARAM NAME=bgcolor VALUE="#FFFFFF">
<PARAM NAME="FlashVars" VALUE=<%=Flashvars%>>
<EMBED src="Parent_Dashboard.swf" quality=high bgcolor=#FFFFFF WIDTH="1329" HEIGHT="747"
NAME="main" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED>
</OBJECT>
</BODY>
</HTML>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值