Error Object reference not set to an instance of an object while report running.

Hi All,

I am getting this error while creating PDF from this option, Has anyone ever face this error please help me why this error is coming.Also When i click print preview the same error comes.

Welcome To DUG!!!

Kindly check whether Adobe PDF is installed properly

As well henceforth mention Version of NAV…

Dear Amol,

Adobe reader is installed properly and i am using NAV 2013 R2 AUS version.

Dear Amol,

This error is coming only in one report. i am able to print preview other reports and convert then into PDF as well.

Can you please check if in the groups defined in the report you have some filters like this?

Fields!MyField.Value > " "

Because they have to be replaced with Cstr(Fields!MyField.Value) > " " to avoid this kind of errors.

Dear Daniele,

I have checked the filter and it is correct as you specified in the example. What else can cause this error?

Other reasons can be Automation/DotNet interoperability used but not instantiated, can be your case?

Dear Amol/Daniele,[:D]

I found the solution.

Somebody used the “ReportItems!MyField.Value” in the visibility expression of the Report Header textboxes, we can not use ReportItems keyword in the report header and footer. that is the reason for this error.

Thanks both of you for your suggestions.

Hello Yes I am having the same problem and I do have several text boxes referring to ReportItems in the expression, do I remove them all, what If I do want text to appear there?

You need to use GetData/SetData functions:

Thank you for your responsee, Just wondering…the same report works in our test system without erroring.

Few days later, without making any changes to the report, it has started to work again, so now the report can be saved as PDF or can be seen in Page view… Not sure what’s going on.