Object reference not set to an instance of an object!!!

Stimulsoft Reports.WEB discussion
Post Reply
M.I.A
Posts: 22
Joined: Thu Mar 11, 2010 1:50 am

Object reference not set to an instance of an object!!!

Post by M.I.A »

Hello

My problem, when i see my report result, i tried to save it in any format for example : xlsx, txt.....etc, i received this exception exactly on this line of code:

Code: Select all

if (doctorID == "" && Session["perAdmin"].ToString() != "True")  <<<------------------------ the exception come here
        {
            filterString += "AND StudentDoctorID = @DoctorID ";
        }
The exception is ("Object reference not set to an instance of an object").

The value of [perAdmin] session is assigned in the first page in my web project so no way to this session to be null, this is serious problem for me because i am in the final step in the project and i have to finish it.

Thank you.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Object reference not set to an instance of an object!!!

Post by Jan »

Hello,

This topic is not related to our product. It very hard to say why it not work. If you receive null reference exception than your code can't find "perAdmin" key in session. Check places in your code where you assign this key.

Thank you.
M.I.A
Posts: 22
Joined: Thu Mar 11, 2010 1:50 am

Object reference not set to an instance of an object!!!

Post by M.I.A »

Hello Jan

I though that related to stimulsoft project thats way i asked here, and also i use that session ["perAdmin"] session in many web pages in my project and everything ok except with save button.

Anyway i will check again or try to use another session.

Thank you.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Object reference not set to an instance of an object!!!

Post by Jan »

Hello,

I don't know how to help you. Our report engine don't use "perAdmin" session state. Exception occurs when you try get state of this session. Can you show full source code of your webpage?

Thank you.
Post Reply