on 2023 Nov 09 4:01 PM
Hola a todos!
Estoy teniendo este error al intentar descargar un documento por segunda vez
[NullReferenceException: Referencia a objeto no establecida como instancia de un objeto.]
CrystalDecisions.CrystalReports.Engine.ReportDocument.get_FileName() +76
CrystalDecisions.Web.CrystalReportSource.get_ReportDocument() +243
Estoy descargando un documento en PDF al cambiar los valores cambian los datos del archivo
Dim CRYReporte As New ReportDocument
CRYReporte.Load(Server.MapPath("Actas/rptJuntaIQuim.rpt"))
CRYSourcePrim.Report.FileName = "Actas/rptJuntaIQuim.rpt"
CRYReporte = CRYSourcePrim.ReportDocument
CRYReporte .ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, True, fileName)
CRYReporte.Close()
CRYReporte.Dispose()
CRYReporte = Nothing
GC.Collect()
Request clarification before answering.
I am working with version 13.0.4000.0 because I use Visual Basic 2017, I need my website to work on 32-bit platforms.
The report is generated at the beginning of the page, but if I generate it again I get the previous error and I have to wait about 15 minutes to generate it again.
Hi Evelyn,
13.0.4000.0 is the Microsoft Framework version the SP uses, look in Programs and Features and you will see the version number you have installed.
CR for VS works with VS 2010->2022 so what you are using is fine.
Are you using Sessions and Postback to keep the report in scope? Depending on the data being used it could take that long to refresh. I assume what you could be doing is using a report with saved data.
Here's a KBA on using Sessions and Postback:
https://userapps.support.sap.com/sap/support/knowledge/en/1985571
If you don't use it the report basically runs again for each page or event you are doing.
See if that helps?
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola.
Estoy trabajando con la versión 13.0.4000.0 porque utilizo Visual Basic 2017 necesito que mi sitio web trabaje sobre plataformas de 32bits.
El reporte se genera en el inicio de la pagina, pero si lo vuelvo a generar me sale el error anterior y debo esperar unos 15 minutos para volver a generarlo.
Gracias por su respuesta.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Evelyn,
What version of CR for VS are you using? Go to Programs and Features and look at the Version specified.
SP 34 is the latest version and you can get it from here:
https://help.sap.com/docs/SUPPORT_CONTENT/crystalreports/3354091173.html
That error always indicates the file doesn't exist as specified in code.
Change this line:
CRYSourcePrim.Report.FileName = "Actas/rptJuntaIQuim.rpt"
to the full path, example: "c:\reports\Actas/rptJuntaIQuim.rpt"
Or it could be the "\" is missing:
CRYReporte.Load(Server.MapPath("/Actas/rptJuntaIQuim.rpt"))
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
21 | |
9 | |
8 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.