Hi.
I working with generating pdf reports and it was working using the automation helpers but suddenly it writes a red line stating that an Object reference is not set.
It happens in line 121 in the default ReportToPDFModule.cs. This line:
Ranorex.PDF.Creator.CreatePDF(input, PDFReportFilePath, xml, details);
Stacktrace:
Suddenly this starts to happen. Any clue as to what is going on?
ReportToPDF is throwing object reference not set error
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: ReportToPDF is throwing object reference not set error
Hi Simmisj,
Based on the provided exception, it appears you are not running any test cases when testing the ReportToPDF module since it is failing to convert the pie chart in the report. The pie chart only exists when one or more test cases are executed. If you are only executing setup and teardown regions, no pie chart is generated and you will see this error.
We thank you for reporting this issue and I have since contacted the developer of this tool requesting improved error handling in this scenario. I hope this helps!
Cheers,
Ned
Based on the provided exception, it appears you are not running any test cases when testing the ReportToPDF module since it is failing to convert the pie chart in the report. The pie chart only exists when one or more test cases are executed. If you are only executing setup and teardown regions, no pie chart is generated and you will see this error.
We thank you for reporting this issue and I have since contacted the developer of this tool requesting improved error handling in this scenario. I hope this helps!
Cheers,
Ned
Re: ReportToPDF is throwing object reference not set error
Absolutely right.
The reason I was not running any test cases was so that I could explore the ReportToPDF without waiting for test cases to finish. Now I have just created an empty test case that I run and that fixes the issue.
Thanks.
The reason I was not running any test cases was so that I could explore the ReportToPDF without waiting for test cases to finish. Now I have just created an empty test case that I run and that fixes the issue.
Thanks.