开发者

load report failed

开发者 https://www.devze.com 2023-02-13 15:50 出处:网络
Load report failed this error logged when i try to open Crystal report and if i restart my iis (iisreset) then it\'s working.

Load report failed this error logged when i try to open Crystal report and if i restart my iis (iisreset) then it's working.

Here's my code:

Dim objReport As New CrystalDecisions.CrystalReports.Engine.ReportClass
Dim location As String = context.Server.MapPath("../POC/POC1.rpt")
objReport.FileName = location
objReport.Load()
objR开发者_StackOverflow中文版eport.SetDataSource(dsPOC)

What could be the problem?


Try this...it will give you the perfect idea....

using System;using CrystalDecisions.CrystalReports.Engine;using CrystalDecisions.Shared;namespace Report
 {       public partial class Report : Document    
  {       public void ReportLoad()    
   {             ReportDocument reportDocument = new ReportDocument();       
 string filePath = "C:\Projects\Application\Report\CrystalReport.rpt";            reportDocument.Load(filePath);  
          crystalReportViewer.ReportSource = reportDocument; 
      }   
}}  


Thanks for your response. Now the problem solved by objReport.Dispose(). I called this Dispose Method after appending each document. The problem might be i failed to release data form memory.

regards, saj

0

精彩评论

暂无评论...
验证码 换一张
取 消