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

Looking for CRconfig.xml


Post Author: something_stupid

CA Forum: JAVA


I wrote a small program that should start the embedded reportviewer and show a report. When I run the program the line"D:
JRCViewReport.rpt", 0);

throws an exception: 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,



package crystalreports;

import com.crystaldecisions.ReportViewer.ReportViewerBean;import com.crystaldecisions.reports.sdk.ReportClientDocument;import;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);"D:
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); } }}