2017-01-04 7 views
0

こんにちはすべて私は水晶レポートの生産に次のエラーが発生しています。私はrepordocument diposalを試みました。レジストリ値を増やすと、どちらの場合も機能しません。 enter image description hereCrystalレポートprinjoblimitがエラーを超えています。試してみてくださいジソーザーオブジェクトregisry no use

enter image description here

[EDIT]

以下に添付のエラーは私のコードの下に、この私の正確なコードシナリオ

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
    Try 
     If rpt IsNot Nothing Then 
      For Each t As Table In rpt.Database.Tables 
       t.Dispose() 
      Next 
      rpt.Close() 
      rpt.Dispose() 
      rpt = Nothing 
      ' GC.Collect() 
     End If 
    Catch ex As Exception 

    End Try 

    'Session("RPTManagmentName") = Session("RPTManagmentName") & " - " & Session("RPTBranchName") 
    rpt = New ReportDocument 
    Select Case Request.QueryString("RPT") 
     Case 6 
      Dim Report As CrystalDecisions.CrystalReports.Engine.ReportDocument = New CrystalDecisions.CrystalReports.Engine.ReportDocument 
      Report.Load(Server.MapPath("Reports/RPTBalances.rpt")) 
      Report.SetDataSource(Session("BalancesReportDataSet").Tables(0)) 
      Report.SetParameterValue("ManagmentName", Session("RPTManagmentName")) 
      Report.SetParameterValue("BranchName", Session("RPTBranchName")) 
      Report.SetParameterValue("AccountName", Session("RPTAccountName")) 
      Report.SetParameterValue(" FromDate", CStr(Session("RPTFromDate"))) 
      Report.SetParameterValue("ToDate", CStr(Session("RPTToDate"))) 

      Session("report") = Report 
     End Select 

    CRVShow.ReportSource = rpt 
    CRVShow.DataBind() 

End Sub 


Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload 
     Try 
     If rpt IsNot Nothing Then 
      For Each t As Table In rpt.Database.Tables 
       t.Dispose() 
      Next 
      rpt.Close() 
      rpt.Dispose() 
      rpt = Nothing 
      ' GC.Collect() 
     End If 

     If CRVShow IsNot Nothing Then 
      CRVShow.ReportSource = Nothing 
      CRVShow.Dispose() 
      CRVShow = Nothing 
     End If 
    Catch ex As Exception 

    End Try 

    Try 
     rpt.Close() 
     rpt.Dispose() 
    Catch ex As Exception 

    End Try 
End Sub 
を確認してください 私はあなたの近くに/処分/ gc.collectを動かす推薦
+0

誰も返信してください? – Sabeena

+1

スクリーンショットを撮るのではなく、真剣に写真を撮るのですか? –

+1

これは本当に問題ですか? もしそうなら、私は説明します..これはプロダクションサーバで起こったことです。彼らはwhatsappから私をこのことを共有しました..明らかにモバイルスナップ希望uをクリアしました...今問題を解決するために助けてください...事前に感謝してください – Sabeena

答えて

2

そのアンロードプロセスの外部にあるコード。外

  1. 負荷レポート
  2. 割り当てビューアコントロールに表示レポート
  3. 閉じるビューアコントロールおよびアンロード(完全に)
  4. ビューアコントロールに次に近い/処分/ gc.collect:つまり、任意のビューアーコントロールコードの

レポートがクリーンアップされているときにビューアーコントロールが完全に閉じられていないと思われます。

クリスタルは非常にメモリを消費するプロセスであり、非常に精巧です。

+0

これを行うにはどうすればいいですか? 私のコードで編集しました。 – Sabeena

+1

その後、ビューアの制御コードの外にある/ dispose/gc.collectを閉じる どうすればいいのか説明してください。私はクリスタルレポートが初めてです。 – Sabeena

関連する問題