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

Step's for writing Token for URL Reporting in Crystal Reports Server?

Hi All,

I need a step by step help to set up the token in Crystal Reports server to run the URL reporting with out asking the logon.

I gone through the past thread's, but not helpfull and bit confusing.

I am totaly new to SDK's and java coding

Here is the details:

Crystal Reports Server 2008 installed on Tomcar server.

We have a Oracle Forms front end, due to some limitation we are not able to use any active x controls to run the crystal reports.

Finaly i came up solution with calling the crystal reports via URL.

Through front end URL will contract as per the syntax. It is working fine with passing the user log on and password on URL. But i would like to write the token to hide the logon details.

Please help me any one to set up the token...

Where to write the token?

How the code looks like?

Where we have to setup?

How to call that token code or file from URL?

Current URL sample :

http://<host>:<port>/CrystalReports/viewrpt.cwr?apsuser=user_ID&apspassword=Password&apsauthtype=secEnterprise&id=10012&

promptex-parameter1=value1&promptex-parameter2=value2&promptex-parameter3=value3

Please give me a suggations with opendocument version also. We dont have problem with using any method to resolve the problem.

Much appriciate for your help !

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Sep 26, 2011 at 01:00 PM

    you need to create logon token using BO enterprise SDK and redirect to openDocument.jsp or viewrpt.cwr passing the token in URL. The code to create and pass the token is as follows:

    <%@ page import = "com.crystaldecisions.sdk.framework.*"%>
    <%
    IEnterpriseSession enterpriseSession = CrystalEnterprise.getSessionMgr().logon("username", "password" , "cmsname", "secEnterprise");
    String token =  enterpriseSession.getLogonTokenMgr().getDefaultToken();
    //String url = "http://<host>:<port>/CrystalReports/viewrpt.cwr?id=10012&promptex-parameter1=value1&promptex-//arameter2=value2&promptex-parameter3=value3&token=" + token;
    //or
    //String url = "http://<host>:<port>/OpenDoument/opendoc/openDocument.jsp?iDocID=10012&promptex-parameter1=value1&promptex-//arameter2=value2&promptex-parameter3=value3&token=" + token;
    //or
    // String serializedSession = enterpriseSession.getSerializedSession();
    //String url = "http://<host>:<port>/OpenDoument/opendoc/openDocument.jsp?iDocID=10012&promptex-parameter1=value1&promptex-//arameter2=value2&promptex-parameter3=value3&ivsLogonSession=" + java.net.URLEncoder.encode(serializedSession);
    
    response.sendRedirect(url);
    %>
    

    Put the above code in a JSP, you can place it in /CrystalReports or /InfoViewApp or /OpenDocument on tomcat server. Hope that helps.

    Aasavari

    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.