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>