Skip to Content
Former Member
Feb 16, 2010 at 10:15 AM

CrystalReportViewer throws NullReferenceException on parameter set


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




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;



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.