Print Page | Close Window

varchar(max) types only qualify as string(255)

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5843
Printed Date: 07 May 2024 at 6:46pm


Topic: varchar(max) types only qualify as string(255)
Posted By: jscarlsonTWG
Subject: varchar(max) types only qualify as string(255)
Date Posted: 20 Mar 2009 at 12:17pm
We recently migrated a large db from SQL Anywhere to SQL Server 2005.  All the note attributes were migrated as varchar(max).  In the many Crystal reports we have for this db the varchar(max) fields are showing up as string(255).  Are there any tricks for bringing these clobs across such that their entire values is available to the report? 
The version of CR Developer is 12.0.0.683.  
The preferred ODBC Driver is Native SQL Client. 
Tanks in advance.
Joel



Replies:
Posted By: jscarlsonTWG
Date Posted: 20 Mar 2009 at 1:59pm
I can't understand why this issue even exists as of now. It seems a glaring bug in CR, to be unable to correctly map the data type. I tried altering the column type to "text" in SQL Server. After doing this "Verify Database" prompted me to map the newly altered column, but would not list the column in the list of candidates on the right (yes, I unchecked "Map Type") If I click on "OK" in the "Map Fields" dialog the field are removed from the report (not acceptable.) If I click on "Cancel" in the "Map Fields" dialog the field on the report are still typed as "string https://forums.sdn.sap.com/ - 255 " If I "Verify Database" a second time the field types are finally shown as "Memo" and the report performs as expected.
I would simply suggest that all the varchar(max) attributes in the migrated db be altered to "text" datatype, except that SQL Server has made it quite clear that the "text" datatype should replaced by varchar(max) and that it will be discontinued in subsequent SQL Server releases.
In other words Crystal Reports 12 supports the older mapping not the newer. If that's not a bug, what is?



Print Page | Close Window