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,
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.
Looking forward for your reply.
Hi Stefan,
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 Gert,
I modify the sample, so now it uses 13.1 and it is compatible with Visual Studio 2010.
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
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.
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://es.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://es.infragistics.com/Membership/MySupport.aspx
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.
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.
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.