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
Hi Stefan,
Thank you very much for you reply and solution. I modified your solution to my needs and it runs well. Also the export to Excel is working fine. I tried to make some changes in my application, but the export to excel for the report OPR still does not work. For the other report it works well.
I attach my solution in a zip file.
Maybe you can see what the problem is.
Thank you very much in advance.
Geert
Hello Gert,
I modify the sample, so now it uses 13.1 and it is compatible with Visual Studio 2010.
Looking forward for your reply.
Thank you very much for your quick reply.
I can't open the solution. My mistake. I forgot to mention that I use VS 2010 and Infragistics version 2013.1.
Greetz,
Hello Geert,
Thank you for your post. I have been looking into it and I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.