on 08-18-2006 4:25 AM
<p><COPIED FROM BETA FORUMS> </p><p>Hi all,<br />I have recently entered into crystal reports integration with JSP. I have designed a report by selecting ODBC(RDO) and what ever the data source I have in my system. <br />Now I need to pass data base info dynamically to that report from JSP. Here one important thing is I desinged the report and it's sub reports by connecting to only one data source. In this scenario I am able to pass all below conncetion information dynamically and able to view report.<br /><br />Connection URL: jdbc:oracle:thin:@SERVERNAME:1521:SID<br />Class name : oracle.jdbc.driver.OracleDriver<br />Username; user<br />Password: pwd<br /><br />Code for passing connection info to main report<br />--
<p>Hi Surya,</p><p> Crystal Reports for Eclipse includes a very convenient wizard which will auto-generate the required stub code you will need to change database location at runtime. To access the wizard you can right-click on a report and choose:</p><p> <strong>Crystal Reports ->Create Viewer JSP </strong><br /></p><p><img src="http://static.flickr.com/69/215495260_0221e54dd6.jpg?v=0" /> </p><p>This will launch the following wizard:</p><p><img src="http://static.flickr.com/81/215495261_9793a6cc10.jpg?v=0" /> </p><p>If you look you will see that there is an option to change the data source at runtime. Select this and the required stub code should be added to your JSP page</p><p>This wizard actually analyzes the selected report and creates custom stub code based on the number of database connections, number of subreports, etc.</p><p>It should really simplify what you are trying do.</p><p>The resulting JSP actually makes call to a helper class <strong>JRCHelperSample</strong> which is where most of our API calls and logic are made. This class will be found in the src folder of a web project under the <strong>com.businessobjects.samples</strong> folder. Users can look to this class for samples on how to do things and modify to suit their needs.</p><p>Hopefully this helps.</p><p>Regards,<br />Sean<br /> </p>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<p>i have not got the above feature for crystal reports,due to some limitations,i am using reports and subreports with different datasources(two .ttx) files are being used,the Subreports table alias is correctly identified by my program but in the viewar jsp exceptions come.</p><font size="2" color="#0000ff"><p>com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected Query Engine error---- Error code:-2147467259 Error code name:failed</p><p>at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source)</p><p>at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.getPage(Unknown Source)</p><p>at com.crystaldecisions.report.web.event.aa.a(Unknown Source)</p><p>at com.crystaldecisions.report.web.event.aa.a(Unknown Source)</p><p>at com.crystaldecisions.report.web.event.bx.a(Unknown Source)</p><p>at com.crystaldecisions.report.web.event.b1.broadcast(Unknown Source)</p><p>at com.crystaldecisions.report.web.event.as.a(Unknown Source)</p><p>at com.crystaldecisions.report.web.WorkflowController.if(Unknown Source)</p><p>at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source)</p><p>at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)</p><p>at com.crystaldecisions.report.web.ServerControl.processHttpRequest(Unknown Source)</p><p>at com.crystaldecisions.report.web.viewer.taglib.ServerControlTag.doEndTag(Unknown Source)</p><p>at com.crystaldecisions.report.web.viewer.taglib.ReportServerControlTag.doEndTag(Unknown Source)</p><p>at org.apache.jsp._Display._jspService(_Display.java:152)</p><p>at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)</p><p>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)</p><p>at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)</p><p>at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:683)</p><p>at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:781)</p><p>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)</p><p>at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)</p><p>at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)</p><p>at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)</p><p>at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)</p><p>at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)</p><p>at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)</p><p>at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)</p><p>at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1019)</p><p>at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:592)</p><p>at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)</p><p>at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)</p><p>at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)</p><p>at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)</p><p>at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)</p><p>at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)</p><p>at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)</p><p>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)</p><p>at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)</p><p>at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)</p><p>at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)</p><p>at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)</p><p>at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)</p><p>at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)</p><p>at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)</p><p>at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1019)</p><p>at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:592)</p><p>at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)</p><p>at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)</p><p>at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)</p><p>at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)</p><p>at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)</p><p>at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)</p><p>at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)</p><p>at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)</p><p>at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:449)</p><p>at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:912)</p></font>
<p>Hello,</p><p> What does your viewer.jsp code look like? If you paste the code into your reply I can take a quick look and see if I notice anything out of the ordinary. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) <br /><br /> <strong><a href="http://www.eclipseplugincentral.com/Web_Links-index-req-ratelink-lid-639.html">Rate this plugin @ Eclipse Plugin Central</a></strong> </p>
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.