Hello,
We have a WPF application with igr report designs which are viewed with the Report Viewer.
The application itself runs fine. When I want to export to pdf it works fine, but when I want to export to Excel it generates following error:
Infragistics.Reports.Engine.EngineException: An error occurred while exporting the report. ---> Infragistics.Reports.Engine.InternalEngineException: An error occurred while exporting the report. ---> System.NullReferenceException: De objectverwijzing is niet op een exemplaar van een object ingesteld. bij Infragistics.Reports.Excel.LayoutManager.AdjustCellPosition(TableRecordField field) bij Infragistics.Reports.Excel.LayoutManager.AdjustCellPosition(ReportItem item) bij Infragistics.Reports.Excel.ExcelTableRecordFieldRenderer.BeginRender(IRenderableElementRenderer document, IRenderableElement element) bij Infragistics.Reports.Engine.Document.BeginRender(IRenderableElement element) --- Einde van intern uitzonderingsstackpad --- bij Infragistics.Reports.Engine.NonPagedReportVisitor.<VisitReport>b__b(Exception ex) bij Infragistics.Reports.Engine.ReportProcessor.GetFragments(IAsyncReportProcessorAction`1 callback) bij Infragistics.Controls.Reports.ReportProcessorLocalAdapter.GetFragments(IAsyncReportProcessorAction`1 callback) bij Infragistics.Reports.Engine.NonPagedReportVisitor.VisitReport(IVisited visited) bij Infragistics.Reports.Engine.NonPagedReportVisitor.VisitEnter() bij Infragistics.Reports.Engine.ReportExporter.ExportInternal(IReportItemVisitor reportItemVisitor, IDocument document, Stream targetStream, ExportCallback callback, IReportItemRendererFactory factory, ICancelationProvider cancelationProvider) --- Einde van intern uitzonderingsstackpad ---Exception Message:An error occurred while exporting the report.Inner Exception:De objectverwijzing is niet op een exemplaar van een object ingesteld.Stack Trace: bij Infragistics.Reports.Engine.NonPagedReportVisitor.<VisitReport>b__b(Exception ex) bij Infragistics.Reports.Engine.ReportProcessor.GetFragments(IAsyncReportProcessorAction`1 callback) bij Infragistics.Controls.Reports.ReportProcessorLocalAdapter.GetFragments(IAsyncReportProcessorAction`1 callback) bij Infragistics.Reports.Engine.NonPagedReportVisitor.VisitReport(IVisited visited) bij Infragistics.Reports.Engine.NonPagedReportVisitor.VisitEnter() bij Infragistics.Reports.Engine.ReportExporter.ExportInternal(IReportItemVisitor reportItemVisitor, IDocument document, Stream targetStream, ExportCallback callback, IReportItemRendererFactory factory, ICancelationProvider cancelationProvider)
I can't find out what the reason is why this error is generated.
Could I get some help to resolve this?
Thanks in advance.
Geert De Vylder
Hello Geert,
I have logged this with development under ID: 181108 and I have also created a support ticket on your behalf: CAS-143542-M2P3M1 and have linked the development issue to it, so that you can get automatically updated, when a Service Release containing the fix is available for download. You can get the new version from our website’s “My IG”, “My Keys & Downloads” tags: https://ko.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://ko.infragistics.com/Membership/MySupport.aspx
Hi Stefan,
Thank you very much for investigating this.
I attach the isolated sample.
In the main window click the button "Rapport met daan - OPR Outbound Campagnes" and in the next form click "Genereer rapport" without filling in the other fields.
It will generate the report with some data in it.
Exporting to PDF works fine, but exporting to Excel throws an error.
Thank you very much and good luck finding out what the issue is.
Greetz,
Geert
Could you please isolate the sample you sent me before, so it reproduces your issue, because currently it uses a DB source and I am not able to run it.? This way I will be able investigate this further for you.
Looking forward for your reply.
Thank you for your reply and investigation.
The data is no problem. When I run the application the reports are generated succesfully with the data from the data source. The only thing that does not work for the OPR report is the export to Excel. The export to Excel for the other report in the application works fine. That's what puzzles me. The export to Excel works fine for one report but not for the other one.
I have been looking into your sample, but I wasn't able to run it since the data source of the Report comes from a Database, which is not available. I can suggest you check if the data from the DB is connected successfully.