Hi,
I just want to know if I'have to use SDK to improve URL Reporting on SAP BusinessObjects BI Platform 4.0 ?
I have to hide the connection parameters as "apsuser, ...etc" in order to show a simple and safe URL to extract reports.
Just want information about "how to do that and what I need to do thaht ?"
Regards,
William
do not use viewrpt.cwr to pass in apsusername, password or cmsname instead use thew SDK to create logon token or serialized session that you can pass into the openDocument url.
String serSes = oEnterpriseSession.getSerializedSession();
url = "http://.................../openDocument.jsp?serSes=" +java.net.Encoder.encode(serSes);
SDK cannot help much beyond this for hiding stuff in openDocument.
Ok, using the SDK is the popular answer for this issue.
I'll test your solution soon with some feedbacks.
Regards
Actually people are using this type of URL : http://server:port/...id=....password=...auth=secEnterprise ..., my aim is to remove the login infos which are displayed in CLEAR.
I've read differents documentations about the SDK and i need a few informations :
- 1) Which to choose between token logon or serialized session ?( i would like to use my NUL so i serialized session a good choice ? )
- 2) Where and how should i set up those changes : for exemple Aasavari, where to implement String serSes = oEnterpriseSession.getSerializedSession(); ?
- 3) About the SDK i've installed it on my BO 4 server but can't find any infos about how to use it.
Thanks
1. You can use token or serSes but using serializedSession appears to be less error prone.
2. You will have a JSP page that redirects to openDocument.jsp passing the serSes. like this:
<%@ page import="com.crystaldecisions.sdk.framwork.*" %>
<%
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("<username>","Password>","<cmsname>","<authType>");
String serses = es.getSerializedSession();
response.sendRedirect("http://servername:port/.............................openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses) + "&.......rest of the parameters....");
%>
3. Here is [Developer Guide|http://help.sap.com/businessobject/product_guides/boexir4/en/xi4_boejava_dg_en.zip|] and [API Reference|http://help.sap.com/businessobject/product_guides/boexir4/en/xi4_boejava_apiRef_en.zip] for Platform SDK for BI 4.0
Edited by: Aasavari Bhave on Jan 26, 2012 8:24 AM
Thanks for the answer.
I'm actually checking the Administration guide, and setting up the environment :for that i have to create a "web.xml" file and set up a serialized session :
void defaultToken() throws SDKException
{
IEnterpriseSession enterpriseSession1 = CrystalEnterprise.getSessionMgr().logon("Myusername", "Mypassword", "<Mycms>:<Myport>", "secEnterprise");
String serializedSession = enterpriseSession1.getSerializedSession();
IEnterpriseSession enterpriseSession2 = CrystalEnterprise.getSessionMgr().getSession(serializedSession);
enterpriseSession1.logoff();
}
It seems like to implement your solution i have to create a whole web app or can you clarify it to me ?
Thanks
in BI 4.0, yes. In 3.1 you could simply drop the JSP in /InfoViewApp or /OpenDocument.
However it is fairly easy and straighfwd to do with following steps:
- in tomcat6\webapps create a folder say: test
- create a folder WEB-INF in tomcat6\webapps\test
- Copy basic webi.xml text from developer guide to tomcat6\webapps\test\WEB-INF folder. webi.xml is web descriptor for the web app you are creating. You won't be really using any tags. Change WEB_APPLICATION_NAME to whatever you want, say test. that's how it will be launched with.
- Create a folder lib in tomcat6\webapps\test\WEB-INF
- Copy all the required Jars into tomcat6\webapps\test\WEB-INF\lib, as stated by developer guide.
- Place your JSP in tomcat6\webapps\test
- Launch in a browser: http://servername or localhost:port or 8080/test/<your jsp name.jsp,
thanks
Aasavari
I've followed & completed your steps but i can't manage to get it working.
I'm having a HTTP 404 error : the requested ressource () isn't available.
I've copied all the requested JAR files ( Bi platform administration + SAP Crystal Reports + Web Services <= i didn't know whitch one to pick so i've collected all the jar ), but i can think of 2 points where i'm unconfortable :
1 ) Web.xml file : i've copied the file from the developper documentation : <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>Test</display-name>
<context-param>
<param-name>crystal_servlet_uri</param-name>
<param-value>/CrystalReportViewerHandler</param-value>
</context-param>
<servlet>
<servlet-name>CrystalReportViewerServlet</servlet-name>
<servlet-class>com.crystaldecisions.report.web.viewer.CrystalReportViewerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CrystalReportViewerServlet</servlet-name>
<url-pattern>/CrystalReportViewerHandler</url-pattern>
</servlet-mapping>
</web-app>
and i've removed " <context-param>
<param-name>crystal_image_uri</param-name>
<param-value>/web_application_name/crystalreportviewers</param-value>
</context-param>"
cause it was leading to an empty folder and crystal_image_uri was linking to an empty folder inside Test directory as stated in the developper guide. Do you see any mistakes ?
2) The jsp file : i've copied, tweeked & saved your jsp the result is :
<%@ page import="com.crystaldecisions.sdk.framwork.*" %>
<%
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("Admintest","Password","<MyCMS>","<secEnterprise>");
String serses = es.getSerializedSession();
response.sendRedirect("http://MyCMS:8080/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses) + "&cmd=EXPORT&EXPORT_FMT=U2FPDF:0");
%>
The address that was previously used was http://CMSNAME:PORT/BOE/CrystalReports/viewrpt.crw?id=XXXX&apsuser=USERNAME&apspassword=PASSWORD&apsauthtype=secEnterprise&cmd=EXPORT&EXPORT_FMT=U2FPDF:0 .
If you can see any errors it would be a great help !
Thanks again
the URL is:
http://MyCMS:8080/BOE/OpenDocument/opendoc/openDocument.jsp?......
and previously it should have been:
CrystalReports/viewrpt.cwr and not CrystalReports/viewrpt.crw?
Edited by: Aasavari Bhave on Jan 31, 2012 4:35 PM
Also you don't need all the jars. The only ones you need are:
bcm.jar
biarengine.jar
ceaspect.jar
cecore.jar
celib.jar
ceplugins_core.jar
cesession.jar
corbaidl.jar
ebus405.jar
logging.jar
TraceLog.jar
activation-1.1.jar
aspectjrt.jar
axiom-api-1.2.5.jar
axiom-impl-1.2.5.jar
axis2-adb-1.3.jar
axis2-kernel-1.3.jar
axis2.saaj-1.3.jar
backport-util-concurrent-2.2.jar
certFIPS.jar
com.sap.js.passport.api.jar
commons-logging-1.1.jar
cryptojFIPS.jar
derby.jar
freessl201.jar
log4j.jar
ssljFIPS.jar
stax-api-1.0.1.jar
wsdl4j-1.6.2.jar
wxts-asl-3.2.1.jar
XmlSchema-1.3.2.jar
This is documented in Developer Guide.
Really thanks for your investment.
I've implemented the change in the response.sendRedirect to have an url like this : http://MyCMS:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses)
but i don't know how and where to specify the report id.
My initial aim was having a single url access just without the logon information : Is it possible to do something like : +http://MyCMS:8080/test/test.jsp + report id & export infos+ ?
I'm wondering if the SDK is correctly installed cause i have the following error when using the url http://MyCMS:8080/test/test.jsp :
Exception repport
message
description the server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: unable to compile class for JSP:
An error occured on line : 3 in file jsp: /test.jsp
IEnterpriseSession cannot be resolved to a type
1: <%@ page import="com.crystaldecisions.sdk.framwork.*" %>
2: <%
3: IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("Administrator","314Cosmos314","BOSUITE","secEnterprise");
4: String serses = es.getSerializedSession();
5: response.sendRedirect("http://MyCMS:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses)+ "&cmd=EXPORT&EXPORT_FMT=U2FPDF:0");
6: %>
An error occured on line: 3 in file jsp: /test.jsp
CrystalEnterprise cannot be resolved
1: <%@ page import="com.crystaldecisions.sdk.framwork.*" %>
2: <%
3: IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("Mylogin","Mypass","MyCMS","secEnterprise");
4: String serses = es.getSerializedSession();
5: response.sendRedirect("http://MyCMS:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses)+ "&cmd=EXPORT&EXPORT_FMT=U2FPDF:0");
6: %>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Thanks
the error CrystalEnterprise cannot be resolved indicates that your app server it is not finding the SDK Jar files.
If you use default tomcat then:
1. create a folder say test under tomcat6\webapps
2. Create a folder WEB-INF under tomcat6\webapps\test
3. Create a folder lib under tomcat6\webapps\test\WEB-INF
4. Copy the required Jar files in tomcat6\webapps\test\WEB-INF\lib
5. Make sure you have web.xml in tomcat6\webapps\test\WEB-INF
6. Place your test.jsp in tomcat6\webapps\test
7. Restart tomcat and launch http://servername:8080/test/test.jsp
Here is the simple web.xml
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>test</display-name> <description>test</description> <session-config> <session-timeout>20</session-timeout> </session-config> </web-app>
I followed EVERY steps, copyed the jar files from the directory mentionned in the developper guide, and still not working : having the exact same message as before.
I ran again the client tools and checked that all the SDK are installed succesfully.
Still can't understand why i'm having this error : is the sdk not installed successfully ? error of syntax ? my jsp is :
<%@ page import="com.crystaldecisions.sdk.framwork.*" %>
<%
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("admin","pass>","cms","secEnterprise");
String serses = es.getSerializedSession();
response.sendRedirect("http://cms:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses) + "&id=11931&cmd=EXPORT&EXPORT_FMT=U2FPDF:0");
%>
Please help i can't find any solution.
Just in addition how to do so that I can access the document via http://cms:8080/test/test&&id=11931&cmd=EXPORT for example : so that i can specify in my url the report number & the export type ?
Hi,
Check the spelling of
framework
used in the import statement :
<%@ page import="com.crystaldecisions.sdk.framework.*"%>
Let me know if this solves your error.
Regards,
Pooja Srinivasan
@Pooja You spotted the right mistake.
My initial aim was to remove ONLY the logon informations ( login, password, security ) but not the report number and export type: so from what i'm facing now is it possible to do something like :http://CMS:8080/test/test.jsp&id=idreport&export... ?
Now my jsp is like : <%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("admin","pass","CMS","secEnterprise");
String serses = es.getSerializedSession();
response.sendRedirect("http://CMS:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses) + "&id=11931&cmd=EXPORT&EXPORTFMT=U2FPDF:0_");
%>
Leading to an error with no log : IE can't display the webpage.
Any hint on how to solve this ? and how to insert the parameters in the url and not in the jsp
Thank you
Try the following:
<%
String reportID = request.querystring("reportID");
String exportFormat = request.querystring("EXPORT_FMT");
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("admin","pass","CMS","secEnterprise");
String serses = es.getSerializedSession();
response.sendRedirect("http://CMS:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses) + "&id=" + reportID + "&cmd=EXPORT&EXPORT_FMT=" + exportFormat);
%>
and how you launch the page is:
http://CMS:8080/test/test.jsp?reportid=123456&EXPORT_FMT=U2FPDF:0
I can see the following problem within your code:
1. extra underscore (_) before " _"&id" in the URL.
2. The URL: http://CMS:8080/test/test.jsp&id=idreport&export... is not syntactically correct. ? needs to be right after .jsp and any querystring parameters that you pass in are separated by &.
if you look up on google on passing querystring parameters in jsp, it will show examples on how to do it. Anyways I have also shown it above.
Thanks for not giving up on this issue.
I had few errors that i managed to reduce with adding to your lattest jsp the following code :
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
But i'm still having the following error :
State HTTP 500 -
type Exception report
message
description the server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: unable to compile class for JSP:
An error occured on line: 3 in file jsp: /test.jsp
The method querystring(String) is undefined for the type HttpServletRequest
1: <%@ page import="com.crystaldecisions.sdk.framework.*" %>
2: <%
3: String reportID = request.querystring("reportID");
4: String exportFormat = request.querystring("EXPORT_FMT");
5: IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("admin","pass","cms","secEnterprise");
6: String serses = es.getSerializedSession();
An error occured on line: 4 in file jsp: /test.jsp
The method querystring(String) is undefined for the type HttpServletRequest
1: <%@ page import="com.crystaldecisions.sdk.framework.*" %>
2: <%
3: String reportID = request.querystring("reportID");
4: String exportFormat = request.querystring("EXPORT_FMT");
5: IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("admin","pass","cms","secEnterprise");
6: String serses = es.getSerializedSession();
7: response.sendRedirect("http://cms:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses) + "&id=" + reportID + "&cmd=EXPORT&EXPORT_FMT=" + exportFormat);
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Any hints ?
My jsp ( test.jsp ) is like this :
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%
String reportID = request.querystring("reportID");
String exportFormat = request.querystring("EXPORT_FMT");
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("admin","pass","cms","secEnterprise");
String serses = es.getSerializedSession();
response.sendRedirect("http://cms:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses) + "&id=" + reportID + "&cmd=EXPORT&EXPORT_FMT=" + exportFormat);
%>
and i request the url :
http://cms:8080/test/test.jsp?reportid=11931&EXPORT_FMT=U2FPDF:0
I have restarted the tomcat server.
Edited by: WILLIAM MARCY on Feb 6, 2012 5:10 PM
Edited by: WILLIAM MARCY on Feb 6, 2012 5:47 PM
use
String reportID = request.getParameter("reportID");
String exportFormat = request.getParameter("EXPORT_FMT");
instead of
String reportID = request.querystring("reportID");
String exportFormat = request.querystring("EXPORT_FMT");
Thanks for the changes.
It worked now i'm finally redirected to open document.
But still not working i have the following error message : an error occured : document not found.
I have used this url : http://cms:8080/test/test.jsp&reportid=9484&EXPORT_FMT=U2FPDF:0 and i'm redirected to another url : cms:8080/BOE/OpenDocument/123/PlatformServices/service/app/error.do
I'm sure about the report id.
I've tryed to remove export infos but i'm led to the same error page ( error.do ).
If i can provide any helpfull infos ask me.
Thanks
Stdout.log :
.
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (com.sun.faces.config.ConfigureListener).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (org.apache.commons.digester.Digester).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (com.sun.faces.config.ConfigureListener).
log4j:WARN Please initialize the log4j system properly.
com.businessobjects.webpath.rebean3ws.Activator
log4j:WARN No appenders could be found for logger (com.sun.faces.config.ConfigureListener).
log4j:WARN Please initialize the log4j system properly.
stderr.log
.
6 févr. 2012 18:13:23 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra (1.2_12-b01-FCS) for context '/BOE'
6 févr. 2012 18:13:25 com.sun.faces.spi.InjectionProviderFactory createInstance
INFO: JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
6 févr. 2012 18:13:47 org.apache.cxf.transport.servlet.CXFNonSpringServlet loadBusNoConfig
INFO: Load the bus without application context
6 févr. 2012 18:13:51 org.apache.cxf.transport.servlet.AbstractCXFServlet replaceDestinationFactory
INFO: Replaced the http destination factory with servlet transport factory
6 févr. 2012 18:13:52 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
INFO: Creating Service Gateway from class com.businessobjects.services.coresdk.wsgateway.GatewayPort
6 févr. 2012 18:13:52 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be /Gateway
6 févr. 2012 18:14:02 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Déploiement du descripteur de configuration BusinessProcessBI.xml
6 févr. 2012 18:14:05 org.apache.catalina.startup.ContextConfig validateSecurityRoles
INFO: ATTENTION: Le nom de rôle de sécurité noaccess est utilisé dans un <auth-constraint> sans avoir été défini dans <security-role>
6 févr. 2012 18:14:07 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Déploiement du descripteur de configuration dswsbobje.xml
6 févr. 2012 18:14:09 org.apache.catalina.startup.ContextConfig validateSecurityRoles
INFO: ATTENTION: Le nom de rôle de sécurité noaccess est utilisé dans un <auth-constraint> sans avoir été défini dans <security-role>
6 févr. 2012 18:14:09 org.apache.catalina.startup.ContextConfig validateSecurityRoles
INFO: ATTENTION: Le nom de rôle de sécurité SAPRole est utilisé dans un <auth-constraint> sans avoir été défini dans <security-role>
6 févr. 2012 18:14:14 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Déploiement du descripteur de configuration explorer.xml
6 févr. 2012 18:14:15 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Déploiement du descripteur de configuration explorer_help.xml
6 févr. 2012 18:14:15 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Déploiement du descripteur de configuration host-manager.xml
6 févr. 2012 18:14:15 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Déploiement du descripteur de configuration manager.xml
6 févr. 2012 18:14:15 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Déploiement du descripteur de configuration MobileOTA14.xml
6 févr. 2012 18:14:15 org.apache.catalina.startup.HostConfig deployWAR
INFO: Déploiement de l'archive jsfplatform.war de l'application web
6 févr. 2012 18:14:16 org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
6 févr. 2012 18:14:16 org.apache.catalina.startup.HostConfig deployWAR
INFO: Déploiement de l'archive MobileBIService.war de l'application web
6 févr. 2012 18:14:17 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Déploiement du répertoire CMCDoc de l'application web
6 févr. 2012 18:14:17 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Déploiement du répertoire docs de l'application web
6 févr. 2012 18:14:17 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Déploiement du répertoire examples de l'application web
6 févr. 2012 18:14:17 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
6 févr. 2012 18:14:17 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
6 févr. 2012 18:14:17 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Déploiement du répertoire InfoViewDoc de l'application web
6 févr. 2012 18:14:17 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Déploiement du répertoire ROOT de l'application web
6 févr. 2012 18:14:17 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Déploiement du répertoire test de l'application web
6 févr. 2012 18:14:18 org.apache.coyote.http11.Http11Protocol start
INFO: Démarrage de Coyote HTTP/1.1 sur http-8080
6 févr. 2012 18:14:19 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
6 févr. 2012 18:14:19 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/103 config=null
6 févr. 2012 18:14:19 org.apache.catalina.startup.Catalina start
INFO: Server startup in 349629 ms
try the following:
response.sendRedirect("http://cms:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses) + "&iDocID=" + reportID);
%>
verify that it works.
No still don't work : when calling http://cms:8080/test/test.jsp?reportid=11931: same error message on page http://cms:8080/BOE/OpenDocument/123/PlatformServices/service/app/error.do : an error occured : document not found
the jsp is
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%
String reportID = request.getParameter("reportID");
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("admin","pass","cms","secEnterprise");
String serses = es.getSerializedSession();
response.sendRedirect("http://cms:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses) + "&iDocID=" + reportID);
%>
Maybe the export format is mandatory ? or it is another parameter to use ?
Any hints appreciated
To sumarize i was previously using : http://CMS:8080/BOE/CrystalReports/viewrpt.cwr?id=11931&apspassword=password&cmd=EXPORT&apsuser=admin&apsauthtype=secEnterprise&EXPORT_FMT=U2FPDF:0
which display the report.
Now i'm using http://cms:8080/test/test.jsp&reportid=11931 or http://cms:8080/test/test.jsp&reportid=11931&EXPORT_fMT=U2FPDF:0 but not working.
I've checked the differents states & redirections with opendoc & i have one whith : http://cms:8080/boe/OpenDocument/opendoc/openDocument.jsp?sIDType=CUID&iDocId=AZCZ2Pr5uXdJrNgc1haW5k8
Maybe something related to the sidtype et idocid ?
First try calling:
:
http://CMS:8080/BOE/CrystalReports/viewrpt.cwr?id=11931
directly from abrowser, it should prompt for BO logon and for parameters, DB logon if needed and show the report. Does this work.
Successfull : i'm redirected to http://cms:8080/BOE/OpenDocument/123/CrystalReports/viewrpt.cwr?id=11931&wid=56fa5eb8916289dc which display :
Connection to BusinessObjects Enterprise
-
CMS name : cms:6400 ( prefilled )
Username :
Password :
Authentification : enterprise ( prefilled )
When completing username & password i'm successfully led to the document id 11931
So maybe the error is coming from the redirection ? Thanks
try
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%
String reportID = request.getParameter("reportID");
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("admin","pass","cms","secEnterprise");
String serses = es.getSerializedSession();
response.sendRedirect("http://cms:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses) + "&iDocID=" + reportID);
%>
or
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%
String reportID = request.getParameter("reportID");
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("admin","pass","cms","secEnterprise");
String token = es.getLogonTokenMgr().getDefaultToken();
response.sendRedirect("http://cms:8080/BOE/OpenDocument/CrystalReports/viewrpt.cwr?id=" + reportID + u201C&token=" + token);
%>
The URL you launch should be:
http://cms:8080/test/test.jsp?reportID=11931 and not http://cms:8080/test/test.jsp?reportid=11931
Java is case sensitive and reportID is not same as reportid.
THANKS a lot you did it !
I'm now redirected on the right webpage.
Unfortunatly it's not over yet :The first jsp is working perfectly with chrome but with IE 8 ( the browser of my company ) i'm led to a webpage saying : "internet explorer can't display the requested webpage
Try diagnostic the connection issues."
Don't know why i have this display maybe a tomcat configuration ?
Can we continue on this thread or should I open a new one ? Cause i can't change the browser policy of my company.
I added the export information to the url so now my jsp is :
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%
String reportID = request.getParameter("reportID");
String exportFormat = request.getParameter("EXPORT_FMT");
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("admin","password","cms","secEnterprise");
String serses = es.getSerializedSession();
response.sendRedirect("http://cms:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses) + "&iDocID=" + reportID + "&cmd=EXPORT&EXPORT_FMT=" + exportFormat);
%>
and i access the report via : http://cms:8080/test/test.jsp?reportID=11931&EXPORT_FMT=U2FPDF:0
leading to the report number 11931 in Pdf.
Only on Chrome, IE leading to error
Make sure you run IE8 in compatibility mode ( for IE7) as that is how it is supported. And try:
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%
String reportID = request.getParameter("reportID");
String exportFormat = request.getParameter("EXPORT_FMT");
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("admin","password","cms","secEnterprise");
String serses = es.getSerializedSession();
response.sendRedirect("http://cms:8080/BOE/OpenDocument/opendoc/openDocument.jsp?serSes=" + java.net.URLEncoder.encode(serses) + "&iDocID=" + reportID + "&sOutputFormat=" + exportFormat);
%>
The URL you launch should be:
http://cms:8080/test/test.jsp?reportID=11931&EXPORT_FMT=P
EXPORT_FMT=P ( this is uppercase P stands for PDF). Other available are:
H (HTML)
u2022 P (PDF)
u2022 E (Microsoft Excel (97-2003) -
Crystal reports only)
u2022 W (Rich Text Format (RTF) -
Crystal reports only)
Here is OpenDocument Guide for 4.0: http://help.sap.com/businessobject/product_guides/boexir4/en/xi4_opendocument_en.pdf
Still not working with IE but the goal is reached : i'll reduce the amount of people using the url reporting & make them use another browser.
But the redirection is working perfectly so really thanks problem solved.
Hi everyone,
Today i've implemented the solution on my company, and good news : it's working perfectly on IE.
Unfortunatly i didn't think about something : end users are passing parameters on the url with "&prompex-" for exemple &promptex-idbill=1&promptex-idemployee=415".
They are passing some database parameters ( id ) and dates.
I'm currently checking the bo guide for url reporting but i can't find any appliable solution.
Actually we are using an url like : http://cms:8080/test/test.jsp?reportID=11931&EXPORT_FMT=P
and end-users would like : http://cms:8080/test/test.jsp?reportID=11931&EXPORT_FMT=P&promptex-idbill=1&promptex-idemployee=2&.....etc
I can't assume what would be enter on the promptex due to many differents kind of reports.
So as a solution i've tought of creating a parameter in the jsp containing all the informations entered after the export_fmt in the url ( for exemple here : &promptex-idbill=1&promptex-idemployee=2 )so that it could be transmitted on the redirected url.
Is it the right way to do it ?
Can anyone provide me any hints ?
Edit : Looking in the url reporting guide i've found promptex use cases but i don't manage to use it.
I don't know how many parameters users will pass through the url : could be between 0 and 10 differents promptex, with single value no multiple values.
Can't find way to usee lsS[NAME] for even 1 prompt.
Thanks in advance
Opened a new thread : [New thread|http://forums.sdn.sap.com/thread.jspa?threadID=2142489]
Edited by: WILLIAM MARCY on Feb 20, 2012 11:11 PM
Edited by: WILLIAM MARCY on Feb 20, 2012 11:41 PM
Edited by: WILLIAM MARCY on Feb 21, 2012 11:50 AM