Wednesday, 5 September 2012

Accessing dashboards with live data outside of Infoview using CELogonToken


SAP Business Objects Xcelsius Migration Tricks:
Accessing dashboards with live data outside of Infoview using CELogonToken
·         The most important part here is that there is a CELogonToken flash variable that BOE creates when you successfully log in to InfoviewInfoView.
·         Suppose you are created dashboard on Development server with the help of QAAWS / Live Office.
·         If you want to use same dashboard format for Integration / Production Environment by passing the parameters of Integration / Production.
·         Here you can use CELogonToken Functionality, with the help of CELogonToken flash variable server parameters are automatically passes to dashboard.
For applying such functionality you want to do some additional work in your Tomcat Folder in Business Object.
Follow the following steps…
Step I: Initially create a folder named by DashboardTest in Development server in the following path.
(<BO Installation>\Tomcat55\webapps\InfoViewApp).
 Note: (**Create same folder on each server (Int / Prod), using this you can access the credentials of that server).

Step II: Create DashboardTest.jsp File on Development server in the following folder path…
Note: (**Create same JSP File on each server (Int / Prod), using this you can access the                            credentials of that server)
(<BO Installation>\Tomcat55\webapps\InfoViewApp\DashboardTest).

*       JSP File contains following coding

<%@ 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.*,
com.businessobjects.webutil.Encoder""
%>
<%@ page import=""java.sql.*""%>
<%
Dashboard Connectivity
236
//-------------------------------------------------------------------Create BO Session and redirect to Infoview
IEnterpriseSessionenterpriseSession;
/* * Set Enterprise Logon credentials. */
final String BO_CMS_NAME = ""<Server Name>"";
final String BO_AUTH_TYPE = ""secEnterprise"";
final String BO_USERNAME = ""Administrator"";
final String BO_PASSWORD = """";
ILogonTokenMgrlogonTokenMgr;
String defaultToken = """";
final String INFOVIEW_URL = ""http://<Server Name>:<Port Number>/InfoViewApp/logon/start.do"";
/*
* Log onto Enterprise
*/
booleanloggedIn = true;
try {
enterpriseSession = CrystalEnterprise.getSessionMgr().logon(BO_USERNAME,BO_PASSWORD, BO_CMS_NAME,
BO_AUTH_TYPE);
logonTokenMgr = enterpriseSession.getLogonTokenMgr();
defaultToken = logonTokenMgr.createWCAToken("""", 20, 1);
}
catch (Exception error)
{
loggedIn = false;
}
//-------------------------------------------------------------------If login successful
if(loggedIn) {
String Flashvars=""&CELogonToken="" + Encoder.encodeURL(defaultToken);
Flashvars += ""&CEWebServiceURL="" + Encoder.encodeURL(""http://<Server Name>:<Port Number>/dswsbobje/services/session"");
String output = """";
Chapter 8
237
output = output + ""<OBJECT classid=''clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=''http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0'' id=''myMovieName'' style=''width: 355px; height: 237px''> \r\r"";


output = output + ""<PARAM NAME=movie VALUE=''<SWF File Name>.swf''> \r\r""; //( \r = carriage return to make output more legible )
output = output + ""<PARAM NAME=quality VALUE=high> \r\r"";
output = output + ""<EMBED src=''<SWF File Name>.swf'' flashvars=\"" "" + Flashvars + ""\"" quality=high bgcolor=#FFFFFF WIDTH=''1000'' HEIGHT=''600''


NAME=''myMovieName'' ALIGN=\""\"" TYPE=''application/x-shockwave-flash'' PLUGINSPAGE=''http://www.macromedia.com/go/getflashplayer''></EMBED></OBJECT>\r\r"";
out.println(output);
}
//-------------------------------------------------------------------If login failed
else {
out.println(""Login to Business Objects Failed."");
}

            As shown in following screen shot…create folder and file in given path.
          
Step III: Create a Dashboard Using Flash Variable. (Apply data connectivity either QAAWS or Live                               Office)
In Flash variable pass the value of development server.
This URL store into particular cell of excels and point to flash variable  




Step IV:
1)    Create .swf file of dashboard and save it into following folder in all server (DEV / INT / Prod).
(<BO Installation>\Tomcat55\webapps\InfoViewApp\DashboardTest).

2)   Export dashboard into Infoview / CMS.



NOTE:
    1)   Pass the .swf file name as a parameter in JSP file (**On All servers)
2)   In case of QAAWS data connectivity…….Each QAAWS must be same from DEV and another server.
        (i.e. You want to migrate the same QAAWS from DEV to INT/PROD via Import Wizard.)
  * Don’t create QAAWS manually on each server.
Now run the dashboard from DEV or INT or PROD environment.
It will run successfully.

Thanks & Warm Regards,
Parikshit Sadegaonkar*


Wednesday, 21 March 2012

Displaying UserResponse() values on Separable Rows in WEBI Report


                                  Welcome to Web Intelligence Report World

UserResponse () is the WEBI function which retrieves the value(s) of prompt by comparing the prompt text.
By using UserResponse () function, values are in the format of ‘; ‘as shown in following fig 1.1.
Normally, prompt values are retrieved from UserResponse () function by writing the prompt text in double quotes. As shown in Fig 1.1.
Fig 1.1

But our requirement is that the selected prompt values must be separate on rows, not separated by delimiter.
For solving this query, follow the following steps
Step 1:
Create a variable in WEBI Report named by Test
Variable 1: Test
=UserResponse ("Enter values for Store name :")
Fig 1.2
Here you retrieve all the prompt values in the format of delimiter in one cell.
Step 2:
Create another variable named by Value
Variable 2: Value
=Replace (UserResponse ("Enter values for Store name :");";"; Char (13) +Char (10))

Fig 1.3
You can separate the lines using the carriage return character (Char(13)) and a linefeed character(Char(10))


Fig 1.4
Here circular ares is the values of prompt on separate rows by using UserResponse() function.
Thus, we can display UserResponse () values separately in the row format in WEBI Report.


Function Used:
           UserResponse()
       Char (10)