set_PageViewMode null reference exception

Stimulsoft Reports.NET discussion
Post Reply
symphonytech
Posts: 3
Joined: Thu Mar 15, 2018 7:35 am

set_PageViewMode null reference exception

Post by symphonytech »

We have a software product where we use Stimulsoft reports. The software has been installed at various places (at least 100 computers). But only on 1 client's computer facing an issue of null reference exception. PFA screenshot of the error.

Any help is appreciated.
Attachments
Error screenshot
Error screenshot
Report Error.png (160.62 KiB) Viewed 2787 times
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: set_PageViewMode null reference exception

Post by Edward »

Hi Symphonytech,

Please check, that there is a valid default printer installed on that machine.

Thank you,
Edward
symphonytech
Posts: 3
Joined: Thu Mar 15, 2018 7:35 am

Re: set_PageViewMode null reference exception

Post by symphonytech »

Thank you Edward for you reply!

Yes, there is a default printer installed and configured.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: set_PageViewMode null reference exception

Post by Edward »

Hi Symphonytech,

No problem at all.
If you execute the application as Administrator on that machine, is the exception still happening? Maybe there something different about that machine, something like OS version or any difference in some configuration from others? Is it using the local printer or a network printer as a default?

Thank you,
Edward
symphonytech
Posts: 3
Joined: Thu Mar 15, 2018 7:35 am

Re: set_PageViewMode null reference exception

Post by symphonytech »

Apologies for the delay in reply.. we tried it with the admin login too, but error continues. There is a local printer installed and it is configured properly.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Re: set_PageViewMode null reference exception

Post by Edward »

Hi Symphonytech,

It still looks like more of the local machine or printer configuration issue really or maybe some local configuration settings got saved corrupted. As the error points to the page preview settings, please try to change the preview mode from 'Single Page' to 'Continuous' or 'Multiple Pages' and re-render the report.

The local settings are stored by default in the following folder:
c:\Users\[UserName]\AppData\Local\Stimulsoft

Something similar was happening a while ago and was explained in the following post;
viewtopic.php?f=8&t=38017&p=71862

There are some hints also on rebuilding the references to default Stimulsoft dlls and maybe reinstalling them into GAC if that option was used?

Thank you,
Edward
allenmarsh
Posts: 1
Joined: Tue Jul 31, 2018 5:28 am

Re: set_PageViewMode null reference exception

Post by allenmarsh »

A NullReferenceException exception is thrown when you try to access a member on a type whose value is null. A NullReferenceException exception typically reflects as developer error. To fully understand why a NullReferenceException is thrown, it is important to know the difference between value types and reference types.

So, if you're dealing with value types, NullReferenceExceptions can not occur. Though you need to keep alert when dealing with reference types!

Only reference types, as the name is suggesting, can hold references or point literally to nothing (or 'null'). Whereas value types always contain a value.

Reference types (these ones must be checked):

dynamic
object
string


Value types (you can simply ignore these ones):

Numeric types
Integral types
Floating-point types
decimal
bool
User defined structs
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: set_PageViewMode null reference exception

Post by Lech Kulikowski »

Hello,

Thank you for the additional information.
Post Reply