Quantcast
Channel: SCN : Popular Discussions - Java SDK Application Development
Viewing all articles
Browse latest Browse all 1701

unable to integrate crystal reports with life ray portlets.

$
0
0

Hi...

 

i am trying to integrate crystal reports with LifeRay portlets, and the version i am using  is CrystalReports11. steps i have followed are below.

1. Copy Java Reporting Component and necessary support .jars from C:\Program Files\Common Files\Crystal Decisions\2.5\java\lib and C:\Program Files\Common Files\Crystal Decisions\2.5\java\lib\external into the u201C/libu201D folder inside the web application or .war file.

2. Copy the contents of the crystalreportviewers10 directory (found in C:\Program Files\Common Files\Crystal Decisions\2.5) to a subdirectory of the same name directly underneath the CRStartupGuide directory (as a peer to WEB-INF). Ensure that all contents, both files and subdirectories, are copiedu2014there should be about 150 files in all. This name of this subdirectory in the CRStartupGuide directory is not important, so long as it matches up when referenced in the web.xml file, which must have the following block added:

<context-param>

<param-name>crystal_image_uri</param-name>

<param-value>crystalreportviewers10</param-value>

</context-param>

Generally, developers will leave the name as is (crystalreportviewers10).

 

 

3. Copy the CrystalReportingEngine-config.xml file into the u201CWEB-INF/classesu201D subdirectory from C:\Program Files\Common Files\Crystal Decisions\2.5\java directory. Open it up, and change the u201Creportlocationu201D element to read u201C..u201D instead of its default u201C../..u201D3.

4. Copy the report file itself into the WEB-INF directory of the webapp.

5. Write the JSP page (call it basic.jsp, in the root of the web application subdirectory) that will ask the Crystal Reports rendering engine to take the passed report and generate HTML from it, echoing it back to the webappu2019s current client. This takes two principal steps. First, we need to create a report viewer to use to process the HTTP request, and second, we need to create a report source that the report viewer will use as the input for generating the report. The report source is an simple object around the filename of the report, as shown here:

<%@ page import="com.crystaldecisions.reports.reportengineinterface.*,

com.crystaldecisions.report.web.viewer.*" %>

<%

CrystalReportViewer crv = new CrystalReportViewer();

JPEReportSourceFactory jrsf = new JPEReportSourceFactory();

crv.setReportSource(

jrsf.createReportSource("Report1.rpt",

request.getLocale()));

crv.processHttpRequest(request, response,

application, null);

%>

6. Browse to http://localhost:8080/CRStartupGuide/basic.jsp:

 

the same steps are working fine in the normal web application and tomcat6. But in the portlets (liferay tomcat6) i am gettng the below execption

 

org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unable to locate CRConfig.xml configuration file---- Error code:-2147467259 Error code name:failed

 

please help me iam working on this since long time i could not found any solution. please suggest me what i need to correct here. Help would be appriciated.

and also please let me know how to change datasource dynamically through java code.

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 1701

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>