loading error

Error loading the error report that was registered while trying to open the Crystal report, and if I restart iis (iisreset), it will work.

Here is 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() objReport.SetDataSource(dsPOC) 

What could be the problem?

0
source share
3 answers

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; } }} 
0
source

If you use VB.net as the code to use this sample code to download the crystal report.

0
source

Thanks for your reply. Now the problem is resolved objReport.Dispose (). I called this Dispose method after adding each document. Perhaps the problem is that I could not free the memory of the data form.

Regards, Saj

0
source

Source: https://habr.com/ru/post/893914/


All Articles