2011-01-14 17 views
1

私はCrystal Reportの新機能です。バックエンドのC#でasp.netでOne Crystalレポートを作成し、チャートを追加しました。それは正しく実行されていますが、アプリケーションを実行すると正しく処理されます。それだけで、レポートviwerバーを示し、Crystalレポートの問題

レポートApplication Serverは私を助けてください

を失敗したというエラーが発生します。

ありがとうございました

答えて

1

あなたの質問にはあまり詳しくはありません。

とにかく私はMSDN:http://social.msdn.microsoft.com/Forums/en/vscrystalreports/thread/a6e12469-2bf1-4c4f-b291-0cf06465b740で興味深い投稿を見つけました。

多くの解決策が提供されています。私たちはあなたからの情報はありませんので、すべて試してみてください。

  • 一時ファイル:一時ファイルを一時フォルダから削除します。システムを再起動します。

原因:システムが異常終了したときに発生しました。 Crystalレポートには、一時的なレポートファイルがTempフォルダに残っています。これにより、Load Report failedエラーが発生しました。

  • レジストリ:PrintJobLimitを75から-1に変更します。プログラム10.2 \レポートアプリケーションサーバー\サーバー\ PrintJobLimit

    • \

    HKEY_LOCAL_MACHINE \ソフトウェアの\のクリスタルディシジョン:

あなたはここに、まだこのための解決策を見つけていない場合はされて最後のものこのC#の例は完全に機能します。ここでコードのスニペット。 Web上で読むことができないものから容易には見えなかったものを強調しています。

private ReportDocument CrystalRpt; 
    //Declaring these here and disposing in the Page_Unload event was the key. Then the only other issue was the 
    // limitations of Crystal 11 and simultaneous access to the rpt file. I make a temp copy of the file and use that in the 
    // method. Then I delete the temp file in the unload event. 

    private ReportDocument mySubRepDoc; 
    private ReportClass ReportObject; 
    private string tmpReportName; 

    protected void Page_UnLoad(object sender, EventArgs e) 
    { 
Try 
{ 
      CrystalReportViewer1.Dispose(); 
      CrystalReportViewer1 = null; 
      CrystalRpt.Close(); 
      CrystalRpt.Dispose(); 
      CrystalRpt = null; 
      mySubRepDoc.Close(); 
      mySubRepDoc.Dispose(); 
      mySubRepDoc = null; 
      ReportObject.Close(); 
      ReportObject.Dispose(); 
      ReportObject = null; 
      GC.Collect(); 
      File.Delete(tmpReportName); 

} 
catch 
{ ...Error Handler } 
    } 



protected void Page_Load(object sender, EventArgs e) 
    { 
     CrystalRpt = new ReportDocument(); 
     ConnectionInfo CrystalConn = new ConnectionInfo(); 
     TableLogOnInfo tblLogonInfo = new TableLogOnInfo(); 
     ReportObject = new ReportClass(); 

     TableLogOnInfo CrystalLogonInfo = new TableLogOnInfo(); 
     ParameterField CrystalParameter = new ParameterField(); 
     ParameterFields CrystalParameters = new ParameterFields(); 
     ParameterDiscreteValue CrystalParameterDV = new ParameterDiscreteValue(); 

     TableLogOnInfo ConInfo = new TableLogOnInfo(); 
     SubreportObject mySubReportObject; 
     mySubRepDoc = new ReportDocument(); 

     //Report name is sent in querystring. 
     string ReportName = Request.QueryString["ReportName"]; 

     // I did this because Crystal 11 only supports 3 simultaneous users accessing the report and 
     // we have up to 60 at any time. This copies the actual rpt file to a temp rpt file. The temp rpt 
     // file is used and then is deleted in the Page_Unload event 

     Random MyRandomNumber = new Random(); 
     tmpReportName = ReportName.Replace(".rpt", "").Replace(".ltr", "") + MyRandomNumber.Next().ToString() +".rpt"; 
     File.Copy(ReportName, tmpReportName, true); 

     CrystalRpt.Load(tmpReportName); 
+0

レジストリソリューションが最適です –

関連する問題