2011-07-07 68 views
0

win7 Ultimate x32ではすべてが正常ですが、win7 pro x64ではCRとVS2010の同じコードを使用できません。

マイコード:Windows 7 ProのVS2010用Crystal Reports - ロードレポートが失敗しました

 ReportDocument doc = null; 
     try 
     { 
      doc = new ReportDocument(); 
      doc.Load("D:\\CrystalReport4.rpt"); 
     } 
     catch (Exception ex) 
     { 
      MessageBox.Show(ex.ToString()); 
     } 
     finally 
     { 
      if (doc != null) 
      { 
       doc.Close(); 
       doc.Dispose(); 
      } 
     } 

は常に例外をスロー:

CrystalDecisions.Shared.CrystalReportsException: Load report failed. ---> System.Runtime.InteropServices.COMException: The system cannot find the path specified. 

    at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) 
    at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) 
    at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() 
    --- End of inner exception stack trace --- 
    at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() 
    at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) 
    at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) 
    at CrystalReportsApplication1.Form1.button1_Click(Object sender, EventArgs e) in J:\Projects\CrystalReportsApplication1\CrystalReportsApplication1\Form1.cs:line 33 

RPTファイルへのパスが正しいです。なぜ内部例外が表示されるのかわからない:システムは指定されたパスを見つけることができません。

私のマシンにインストール:
- SAP Crystal Reportsの、Visual Studio用バージョン2010
- SP1、GACにあるバージョンのSAP Crystal Reportsの、.NET Frameworkの4(64)
それらのすべてのためのランタイムエンジンです:13.0.2000.0

誰でも問題を解決できますか?
ありがとう

答えて

0

64ビットコンピュータに32ビットバージョンをインストールしてみてください。エラーが同じかどうかはわかりませんが、第三者によって書かれたレポートを実行するのと同様の問題がありました。 32ビットランタイムバージョンをインストールすると、私のために修正されました。

関連する問題