Skip to Content
0
Former Member
Sep 11, 2007 at 05:18 PM

Looking for CRconfig.xml

92 Views

Post Author: something_stupid

CA Forum: JAVA

Hi,

I wrote a small program that should start the embedded reportviewer and show a report. When I run the program the line

reportClientDoc.open("D:
UserTemp
JRCViewReport.rpt", 0);

throws an exception:

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: CRConfig.xml Konfigurationsdatei nicht gefunden---- Error code:-2147467259 Error code name:failed

Apparently the CRconfig.xml file cannot be found.

Question1: Can I tell the class ReportClientDocument where to find it?

Question2: If not, where does he look for it?

Question3: Is the CRconfig.xml necessary?

I'm attaching the source code that produces the exception.

Thanks in advance,

Torsten

=========================================================================================

package crystalreports;

import com.crystaldecisions.ReportViewer.ReportViewerBean;import com.crystaldecisions.reports.sdk.ReportClientDocument;import com.crystaldecisions.sdk.occa.report.lib.ReportSDKException;import java.awt.BorderLayout;import java.awt.Container;import javax.swing.JFrame;import javax.swing.SwingUtilities;

public class MainClass extends JFrame { private ReportClientDocument reportClientDoc = new ReportClientDocument(); private ReportViewerBean reportViewer = new ReportViewerBean(); private Container cp = null; public MainClass() { } public static void main(String [] args) { SwingUtilities.invokeLater(new Runnable() { public void run() { new MainClass().launchApp(); } }); } public void launchApp() { try { cp = getContentPane(); cp.setLayout(new BorderLayout()); cp.add(reportViewer); reportClientDoc.open("D:
UserTemp
JRCViewReport.rpt", 0); reportViewer.setReportSource(reportClientDoc.getReportSource()); this.setLocation(50, 50); this.setSize(600, 600); reportViewer.init(); reportViewer.start(); this.setVisible(true); } catch(Exception ex) { System.out.println(ex); } }}

=========================================================================================