SAP Knowledge Base Article - Public

1652158 - CrystalReportViewer.Zoom() does not accept 'special' values

Symptom

  • Running a Visual Studio .NET Web application
  • Setting CrystalReportViewer.Zoom Method to the value of 1 or 2 results in the error:

Specified argument was out of the range of valid values. Parameter name: Page zoom factor must be between 10 and 400

''

 

Environment

  • Crystal Reports for Visual Studio 2010
  • VS2010

Reproducing the Issue

  • Use the CrystalReportViewer.Zoom Method to change the zoom factor CrystalReportViewer control
  • Value of 1 to fit the entire width of the page

CrystalReportViewer.Zoom = 1

  • Value of 2 to fit the entire page in the window

CrystalReportViewer.Zoom = 2

Cause

  • The values of 1 or 2 are reserved for the Windows Viewer only

Resolution

  • None - do not use values of 1 or 2 to control the zoom of the Crystal Reports Web viewer

Keywords

CR2010 2010 CR4VS2010 CR4VS VS2010 NET2010 Crystal Reports for .NET Framework 4.0 crforvs 13 , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio