Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

255 Character limit 3

Status
Not open for further replies.

latwv

Programmer
Nov 19, 2001
16
US
I am using:
Crystal Report Designer 8.5 with
VB 6 Data Environment as the data source
which calls stored procedures from SQL Server 2000.

I have a field that is larger than 255 characters in my data source. The data environment brings back the full field (at least the field length is larger than 255 when I checked in the immediate window), but the report truncates it at 255. Can someone help me to find a way to be able to show the whole field and not just the 255 characters.


Thanks in advance
Lori
 
The latest CrystalCareNews newsletter addressed this issue.
It turns out that because Crystal was written in C++ a string field cannot hold more than 255 chracters. They suggest parsing the memo field into several shorted fields before bringing them into Crystal. Using MS-SQL they suggest creating a view using the substring() function like this:

substring(memofield,1,100) as field1
substring(memofield,101,200) as field2
etc.

In Crystal use this view as your database and then create a formula that re-unites the fields created:
{field1}+{field2}+{field3} etc.

good luck! Crystal Reports training, consulting, books, training material, software, and support. Scheduled training in 8 cities.
howard@hammerman.com
800-783-2269
 
Usually when CR encounters a field greater than 255, it doesn't truncate but converts it to memo. You would see all of the data, but you wouldn't be able to manipulate it. Your behavior seems different. What data type is CR seeing this field to be when you are in the design environment? Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Howard Hammerman,
I have done as you suggested by creating substrings of 254 characters each in my stored procedure and then concatenating them together in a formula field and now I get the error that says that a string can be no longer than 254 characters. Any suggestions?


ken hamady,
It was showing the field as a string of 255 characters.


Thanks to all for your help,
Lori

 
Hi,

you won't be able to concatenate these fields in a formula,
only by dropping each field in a single text field in the report, one after the other.

Eg. the text field could be...

The whole string is {field1}{field2}{field3}


As Ken says, you can't use the field in a formula because it would generate a text string greater than 255 chars.

Hth,
Geoff
 
Hi !

This issue was very helpful for me.

Just a remark:

using substring in sql, the 3rd entry is not the last charactere, but the length of the substring, so use:

substring(memofield,1,255) as field1
substring(memofield,256,255) as field2

and so on...


Dv
 
Actually this thread is somewhat datred as this issue has been resolved in CR v9. In version 9 you can use memo fields in formulas and the 255 characters is no longer a limitation. I believe the limit now is 64,000 characters. Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top