Skip to Content
author's profile photo Former Member
Former Member

Get the user and password inserted in the loggin screen.

Hi all.

I have created a Xcelsius using a query Bex as web service using the Data Management using Query as a Web Service. It runs ok, inside the Xcelsius I have create an object with a hyperlink to call a Report of Crystal Reports. I have used the syntax

http://<server>:<port>/OpenDocument/opendoc/openDocument.jsp?sType=wid&iDocID=<id>

but with this syntax, when click on the hyperlink, the system ask again for the user and password (the Xcelsius is executed in the infoview, so, I have enter the user and password in the infoview logon.)

If I use the syntax

http://<server>:<port>/CrystalReports/viewrpt.cwr?id=<id>&apsuser=<user>&apspassword=<password>&apsauthtype=secEnterprise

I have no way to get the user and password introduced in the logging screen of the infoview.

How can I call the Report of Crystal Reports using the user logged in the infoview?

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 14, 2011 at 10:44 AM

    I understand that you created a Xcelsius that contains an opendocument link to open a crystalreport doc.

    You published the Xcelsius to infoview in format .swf, then when you click on the link to open crystalReport, you get prompted.

    This is normal because Infoview is an application that run in its own context and opendocument is an other application that run in its own context.

    So you logon to Infoview with a credential that is only valid for Infoview and this credential is not used by opendocument application.

    It is a normal behaviour.

    To workaround this you need a single sign-on mechanism. One is to use the BusinessObjects Enterprise SDK to create a token.

    For instance, instead of directly calling within Xcelsius, the opendocument link to open crystalreport, you can indirectly called for instance a customed

    JSP application based on BusinessObjects Enterprise SDK that will contain the logic to create a token then pass the token to the opendocument URL to open crystalreport in SSO mode.

    Please find below a snippet code about how the JSP customed application based on BusinessObjects Enterprise SDK will look like:

    //=============================================================================================

    String cms = "<serverName>";

    String username = "<userName>";

    String password = "<password>";

    String auth = "secEnterprise";

    IEnterpriseSession enterpriseSession;

    String token = "";

    try {

    // Get the enterpriseSession object from the web session.

    ISessionMgr sm = CrystalEnterprise.getSessionMgr();

    // Log on to BusinessObjects Enterprise.

    enterpriseSession = sm.logon(username, password, cms, auth);

    ILogonTokenMgr logonTokenMgr = enterpriseSession.getLogonTokenMgr();

    token = logonTokenMgr.createLogonToken("", 10, 10);

    response.sendRedirect("http://<server>:<port>/OpenDocument/opendoc/openDocument.jsp?sType=wid&iDocID=<id>&token=" + token);

    } catch (Exception er) {

    out.print(er.getMessage());

    }

    //====================================================================================================================

    For more information about the JAVA BusinessObjects Enterprise SDK, refer to those links:

    Link: [API reference|http://help.sap.com/businessobject/product_guides/boexir31/en/boesdk_java_apiRef_12_en.zip]

    Link: [Developer Guide|http://help.sap.com/businessobject/product_guides/boexir31/en/boesdk_java_dg_12_en.zip]

    Link: [Samples Code|http://www.sdn.sap.com/irj/boc/samples?rid=/webcontent/uuid/b0daacb7-ad82-2b10-b2b6-f3e9fa3e716a]

    Note that if you are not a developer, you might need a help of developer to implement the project for you.

    Thanks

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.