SAP Knowledge Base Article - Public

1422831 - How to link VARCHAR(MAX) or NVARCHAR(MAX) fields in the Crystal Reports designer


  • A Crystal Report connects to SQL Server using an ODBC connection.
  • When linking tables in Crystal Reports Database Linking option any VARCHAR(MAX) and NVARCHAR(MAX) fields are grayed out or not available.


  • Crystal Reports 2008
  • Microsoft SQL Server


VARCHAR(MAX) and NVARCHAR(MAX) fields are mapped to Memo field type, which can't be used for joins or links.


***WARNING***: The following resolution involves editing the registry. Using the Registry Editor incorrectly can cause serious problems. Use the Registry Editor at your own risk. Refer to Note 1323322 for more information. 

There is a registry key named MapMaxTypeToString (DWORD) which must be created and set at the following location:

  1. Browse to HKEY_CURRENT_USER\Software\Business Objects\Suite 12.0\Crystal Reports\Database\ODBC
  2. Create a new DWORD value with the name MapMaxTypeToString
  3. Set the value data to a number between 0 and 65534 (decimal). This specifies the string size of the VARCHAR(MAX) and NVARCHAR(MAX) fields.

If the key is not set or set to 0, the ODBC driver will map VARCHAR(MAX) and NVARCHAR(MAX) fields to Memo type, which can not be used to join/link.


VARCHAR(MAX), NVARCHAR(MAX), linking , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To


Crystal Reports 2008 V0 ; Crystal Reports 2008 V1