I am using Crystal Reports JRC (the version that comes with Rational Application Developer 7.5 - I think it is 11.8). I am using the JSP tags to display my report:
<crviewer:viewer reportSourceType="reportingComponent" viewerName="${sessionScope.reportName}-viewer" reportSourceVar="${sessionScope.reportName}" isOwnPage="true"> <crviewer:report reportName="rpts/${sessionScope.reportName}.rpt" /></crviewer:viewer>
Everything seems to be working okay so far but I came across an article by Ted Ueda entitled "Crystal Reports for Eclipse - Ensuring Report Cleanup" located at:[/people/ted.ueda/blog/2008/12/20/crystal-reports-for-eclipse--ensuring-report-cleanup|/people/ted.ueda/blog/2008/12/20/crystal-reports-for-eclipse--ensuring-report-cleanup]
Since I am using the JSP tags and not using the API to display the reports I don't have a report source. So I changed my page with the following code like in his example (I tried putting my modified code up but it won't format correctly and when I preview it, all the fomatting of the post is lost and it's everything on a single line, but it's exactly what Ted has in his example and I am not setting the server - which Ted comments out in his example).
Here is the line that Ted commented out in his example, and I'm not setting it b/c I don't have a RAS:
//reportClientDocument.setReportAppServer(ReportClientDocument.inprocConnectionString); // Version 12+
I then put the clean up code in another page that you must navigate to after you view the report::
<%@ page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer"%><% Object reportSource = session.getAttribute("ReportSource"); if(reportSource != null) { CrystalReportViewer crystalReportViewer; crystalReportViewer = new CrystalReportViewer(); crystalReportViewer.set crystalReportViewer.setReportSource("rpts/"+reportSource+".rpt"); crystalReportViewer.dispose(); } %>
When I run the code it throws an exception:
com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: There is no server specified.---- Error code:-2147217390 Error code name:serverNotFound
I am not using RAS, only the JRC so I don't have a server to specify. So my question is, if I am just using the JRC do I need to worry about cleaning up my reports and if so how is this accomplished using just JRC?
Thanks in advanced,
Jason S. Vorpahl