Skip to Content
avatar image
Former Member

Error when I create a file: CrystalDecisions.CrystalReports.Engine.ReportDocument.get_FileName

Hi I have an error after I create 2400 files,

the error is:

8760331-Object reference not set as an instance of an object. 11/30/2016 07:05:39 p.m. | ERROR | 14 | In CrystalDecisions.CrystalReports.Engine.ReportDocument.get_FileName () In CrystalDecisions.CrystalReports.Engine.ReportClass.Load (String reportName, OpenReportMethod openMethod, Int16 parentJob) In CrystalDecisions.CrystalReports.Engine.ReportClass.Load () In WFGeneraDUA.frmGeneraDUA.PrintFactura (OracleConnection

Exactly I use a ReportDocument which I load once and then I set: ptDocumentFA.SetDataSource(datosDocAutorizado) by each item into the while statement. My code:

1.png

Inside: ImprimirFacturaAM

I have the code:

2.png

I dont' use dispose by each item beause is very slow. After 40 minutes of the process, I get this error: Object reference not set as an instance of an object

I don't know. what is the error?

1.png (30.6 kB)
2.png (83.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Dec 01, 2016 at 10:01 PM

    Unfortunately you can't keep all of those reports open. they must be closed and disposed of.

    Don

    Add comment
    10|10000 characters needed characters exceeded