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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Crystal read more than 255 legnth from a SQL table?

Status
Not open for further replies.

dariopowell

Programmer
Jun 15, 2004
14
US
Hello

I trying to access data from Crystal 8.5 from a SQL table. The field length is 500 but Crystal seems to only want to show the first 255 characters.

Is there a setting I can tweak to see the entire field value?
 
It can show more than 254 characters, but you can't use it in a formula, formulas truncate at 254.

If you place the database field in he details it should show in it's entirety.

If not, you might be able to CAST or CONVERT it using a SQl Expression (type of Crystal formula listed below the stanbard formulas) and get it to show.

Try:

CAST(table.field as varchar(500))

Then put the SQL Expression in the details.

-k
 
Ah yes, I tried both of those things, but now luck! Thanks for the tip though.
 
In the SQL expression area try:

[{@first254:]
substr(`table`.`name`, 1, 254)

[{@second254}:]
substr(`table`.`name`, 255, 254)

if substr() doesn't work, you can try:

{fn substring(`table`.`name`, 1, 254)}

etc. If this is a memo field, you will have to type in the table and field name, as it won't appear on the field list. You can place the expressions in a text box nested against each other if you wish.

The punctuation and function availability is specific to your datasource/connectivity.

-LB
 
Good point LB, but it doesn't explain why the field isn't displaying more than 254, when CR 8.X could, you just couldn't use them in formulas...

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top