SAP Knowledge Base Article - Public

1201545 - When I export a Crystal report in Firefox I get the error "Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation = "true"/> ..."

Symptom

  • Exporting a Crystal Report
  • Crystal Report Viewer control for the web
  • <%@ Page EnableEventValidation="true" %>
  • Error: "Server Error in '/[web application]' Application.
    Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation."
Environment
  • Windows 2000 Server, IIS 5
  • Windows 2003 Server, IIS 6
  • Crystal Reports XI R2
  • Crystal Reports for .NET SDK
  • .NET Framework, version 2.0
  • Firefox, version 2.0.0.x

Cause

The error is caused by how Firefox performs caching of the ViewState for web controls. This error doesn't occur for Internet Explorer or Opera.

Resolution

There are 3 solutions for this issue.

 
Solution 1
  • Turn off the event validation feature on the page hosting the Crystal Report Viewer control.
  • You can turn off the event validation by:
    • setting the <pages enableEventValidation="false"/> in the web.config file

or

    • setting the <%@ Page EnableEventValidation="false" %> in the page directive
  • If your site must have event validation enabled you'll need to use solution 2 or 3.
 
Solution 2
  • Remove all other Microsoft web controls from the page hosting the Crystal Report Viewer control.
  • If the Crystal Report Viewer control is the only web control on the .aspx page this error doesn't occur with Firefox.
 
Solution 3
  • Upgrade to Crystal Reports 2008. The export prompt mechanism has changed in Crystal Reports 2008 and isn't impacted by this issue with Firefox.

Keywords

FIREFOX ENABLEEVENTVALIDATION EXPORT DOTNET .NET NET WEB INVALID POSTBACK , 5562239 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Bug Filed

Product

SAP Crystal Reports XI ; SAP Crystal Reports XI R2