Skip to Content
Sep 02, 2020 at 07:55 PM

visual studio 2019 c# wpf, "object reference not set to an instance of an object" error



I'm developing visual studio using crystal report for visualstudio edition.

I downloaded development & runtime for latest version from this site.

Also, I'm developing with visual studio 2019, C#, on WPF platform.

But when I import the controller and run the app,

the reporting viewer open and shows a popup saying that

"object reference not set to an instance of an object"

Because it shows pop up, I can't dig into the problem using the debugging mode.

even if the .rpt file consists of only static text, ( so there's no datasource ) it says the same problem.

but when I comment below line,

reportViewer.ViewerCore.ReportSource= report;

the error pop-up doesn't show up, but it's an only empty viewer with 0 page.

any idea is really appreciated.