SAP Knowledge Base Article - Public

1736617 - How to embed a BI4 Published Dashboard swf file into a web page

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:

Log into the BI 4 Platform's CMC.

Navigate to the folder containing your dashboard.

Right click on the dashboard name and select the "Properties" option.

Copy the CUID from the properties displayed.  Note:  The CUID is displayed next to the ID number.

Edit the sample jsp code attached and supply the credentials that will be used to create an Enterprise session.

Enter the CUID for the dashboard to be opened.

Deploy the jsp file to the JAVA web application server.

<------ Code follows------->

<%@ 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");
//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=Cdata:image/jpeg;base64,<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="#FFdata:image/jpeg;base64, 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>

 

 

Keywords

KBA , BI-RA-XL , Obsolete: BusinessObjects Dashboards and Presentation Design , Problem

Product

SAP BusinessObjects Dashboards all versions