Object reference not set to an instance of an object.
-
"Object reference not set to an instance of an object." is the error I got at my page by came through all the steps of my codes.
Balasubramanian K.
During runtime check if rptDoc holds a value. May be
rptDoc.Load(Server.MapPath("Reports/STTCertificateAnnual1.rpt"));
returns null. -
During runtime check if rptDoc holds a value. May be
rptDoc.Load(Server.MapPath("Reports/STTCertificateAnnual1.rpt"));
returns null."Expression has been evaluated and has no value" is the value I am getting at rptDoc.Load(Server.MapPath("Reports/STTCertificateAnnual1.rpt")); But the report is available in proper place. What I have to do to solve this?
Balasubramanian K.
-
"Expression has been evaluated and has no value" is the value I am getting at rptDoc.Load(Server.MapPath("Reports/STTCertificateAnnual1.rpt")); But the report is available in proper place. What I have to do to solve this?
Balasubramanian K.
If the Reports folder is available in the application root then try
rptDoc.Load("~/Reports/STTCertificateAnnual1.rpt");
HTH! -
If the Reports folder is available in the application root then try
rptDoc.Load("~/Reports/STTCertificateAnnual1.rpt");
HTH!This line throws error as "Load Report Failed"
Balasubramanian K.
-
This line throws error as "Load Report Failed"
Balasubramanian K.
What is the value you get when you try
Server.MapPath("Reports/STTCertificateAnnual1.rpt")
in the immediate window? -
What is the value you get when you try
Server.MapPath("Reports/STTCertificateAnnual1.rpt")
in the immediate window?"Expression has been evaluated and has no value" is the value I am getting at immediate window of rptDoc.Load(Server.MapPath("Reports/STTCertificateAnnual1.rpt"));
Balasubramanian K.
-
"Expression has been evaluated and has no value" is the value I am getting at immediate window of rptDoc.Load(Server.MapPath("Reports/STTCertificateAnnual1.rpt"));
Balasubramanian K.
Check the value of "
rptDoc.IsLoaded
" when using the original coderptDoc.Load(Server.MapPath("Reports/STTCertificateAnnual1.rpt"));
-
Check the value of "
rptDoc.IsLoaded
" when using the original coderptDoc.Load(Server.MapPath("Reports/STTCertificateAnnual1.rpt"));
It returns true. I am getting the business objects' symbols(Export, print, Page nagivator, etc.) also at my page followed by my error.
Balasubramanian K.
-
It returns true. I am getting the business objects' symbols(Export, print, Page nagivator, etc.) also at my page followed by my error.
Balasubramanian K.
In that case, I've lead you in the wrong direction. The report document is not the cause of the error. Sorry. Check the parms collection for values. Also check if the no of params you are passing matches what the report is expecting. Other than that, I've no clues to what is going wrong.
-
In that case, I've lead you in the wrong direction. The report document is not the cause of the error. Sorry. Check the parms collection for values. Also check if the no of params you are passing matches what the report is expecting. Other than that, I've no clues to what is going wrong.
Actually, I pass 4 parameters only. If I pass the same into report directly, I can able to view the report. Through coding, I am trapped. However, you have spent your time for me. Thanks a lot.
Balasubramanian K.