Hi experts,
I really hope somebody can help. I am running out of ideas.
I inherited a web site project with some CrystalReports in it and I should install it on two new customer servers.
When trying to run the report I got the NullReferenceException below:
"NullReferenceException: Object reference not set to an instance of an object."
CrystalDecisions.Web.CrystalReportViewerBase.set_ReuseParameterValuesOnRefresh(Boolean value) +31
ASP.Page_aspx.__BuildControlCrystalReport()
ASP.Page_aspx.__BuildControlshow_filter()
...
At the line:
<CR:CrystalReportViewer ID="CrystalReportVPI" runat="server" AutoDataBind="True" EnableDatabaseLogonPrompt="False" EnableParameterPrompt="False" ReuseParameterValuesOnRefresh="True" ... />
I tried to set the parameters programmatically:
protected void Page_PreInit(object sender, EventArgs e)
{
CrystalReportVPI.AutoDataBind = true;
CrystalReportVPI.EnableDatabaseLogonPrompt = false;
CrystalReportVPI.EnableParameterPrompt = false;
CrystalReportVPI.ReuseParameterValuesOnRefresh = true;
u2026
}
Here i noticed that tha the NullReferenceException is thrown only in the line:
CrystalReportVPI.ReuseParameterValuesOnRefresh = true;
The same site runs on developer environment and on another customeru2019s server with no errors.
The server environment is:
u2022 Win Server 2003
u2022 CRRedist2005_x86.msi
u2022 .NET version 2.
I think there is an installation issue.
Any help would be highly appreciated.