Open a report or a dashboard diectly

Hi all,
I use BOXIr2: DeskI, and PM.

I need to open a dashboard and some reports via an hyperlink in an HTML page directly, without passing the BO login page.

In other words I need to open a report (or a dashborad) passing the userID and password in the hyperlink sintax.

Now I’m trying to open a report, that seems the easiest, and then I’ll try with a dashborad.

I tryed with this:

But this link, obviuosly, doesn’t work, the userID and password are not considered and the BO login page is open.

Can anyone help me?
Thanks in advance,
Ale.


Bo_Arale :it: (BOB member since 2007-09-10)

You need to create an intermediary page that will log you into the enterprise using the SDK and then redirect to opendocument passing the logon token.

Here is a sample code:

<%@ page import="com.crystaldecisions.sdk.framework.*" %>

<%
	/************************** LOGON TO THE ENTERPRISE **************************/

	// Logon to the enterprise
	IEnterpriseSession boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( "username", "password", "cms name", "secEnterprise");
	response.sendRedirect("http://server:8080/businessobjects/enterprise115/desktoplaunch/opendoc/openDocument.jsp?token=" + boEnterpriseSession.getLogonTokenMgr().getDefaultToken() + "&amp;iDocID=14492");
%>

darcstorm :philippines: (BOB member since 2008-07-22)

Thank you darcstorm, it seems very usefull.
I’m going to try it.
Thanks again,
Ale.


Bo_Arale :it: (BOB member since 2007-09-10)

Ok, it works fine.
Now I can open a report directly.
Thanks.

But I also need to open a dashboard directly. I tryed with:


<%
   /************************** LOGON TO THE ENTERPRISE **************************/

   // Logon to the enterprise
   IEnterpriseSession boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( "user name", "password", "cms name", "secEnterprise");
   response.sendRedirect("http://server:8080/businessobjects/enterprise115/desktoplaunch/jsp/appsRedirect.jsp?token=" + boEnterpriseSession.getLogonTokenMgr().getDefaultToken() + "&amp;url=&amp;navPos=1,-1,0");
%> 

but with this code I only logon into InfoView. Maybe appsRedirect.jsp is not the right way…

Is there a method to open a dashboard directly?

Thanks.
Ale.


Bo_Arale :it: (BOB member since 2007-09-10)

Ok I’ve got it.

With this code:


<%
   /************************** LOGON TO THE ENTERPRISE **************************/

   // Logon to the enterprise
   IEnterpriseSession boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( "UserName", "Password", "Server", "secEnterprise");
   String x=request.getParameter("x");
   String y=request.getParameter("y");
   String z=request.getParameter("z");
   response.sendRedirect("http://Server:8080/businessobjects/enterprise115/desktoplaunch/jsp/appsRedirect.jsp?token=" + boEnterpriseSession.getLogonTokenMgr().getDefaultToken() + "&amp;url=&amp;navPos="+x+","+y+","+z+"&amp;linkType=corp&amp;custoStyle=");
%> 

u can open a dashboard directly, passing the navPos parameter.

In other words, if u put this code in a jsp page (like dashboard.jsp, for example) u can open a dashboard directly with

<path>/dashboard.jsp?x=1&amp;y=0&amp;z=0

where x, y and z are the dashboard’s relative positions (the appsredirect’s navPos parameter )

I hope this can help someone,
Ale.


Bo_Arale :it: (BOB member since 2007-09-10)