set_PageViewMode null reference exception
-
- Posts: 3
- Joined: Thu Mar 15, 2018 7:35 am
set_PageViewMode null reference exception
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.
Any help is appreciated.
- Attachments
-
- Error screenshot
- Report Error.png (160.62 KiB) Viewed 2990 times
Re: set_PageViewMode null reference exception
Hi Symphonytech,
Please check, that there is a valid default printer installed on that machine.
Thank you,
Edward
Please check, that there is a valid default printer installed on that machine.
Thank you,
Edward
-
- Posts: 3
- Joined: Thu Mar 15, 2018 7:35 am
Re: set_PageViewMode null reference exception
Thank you Edward for you reply!
Yes, there is a default printer installed and configured.
Yes, there is a default printer installed and configured.
Re: set_PageViewMode null reference exception
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
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
-
- Posts: 3
- Joined: Thu Mar 15, 2018 7:35 am
Re: set_PageViewMode null reference exception
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.
Re: set_PageViewMode null reference exception
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
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
-
- Posts: 1
- Joined: Tue Jul 31, 2018 5:28 am
Re: set_PageViewMode null reference exception
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
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
-
- Posts: 6459
- Joined: Tue Mar 20, 2018 5:34 am
Re: set_PageViewMode null reference exception
Hello,
Thank you for the additional information.
Thank you for the additional information.