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

Long string fields 4

Status
Not open for further replies.

Melzer

Technical User
Jul 30, 2001
11
US
Ever had a field in one of your tables that is a long string varchar. Ends up you can't select of create a formula in Crystal Reports on these fields. Anybody have any advice?
 
I use Crystal Query with:

SELECT
Product_Type.`Description`,
{fn SUBSTRING(Product_Type.`Description`,1 ,254 )}

FROM
`Product Type` Product_Type

Worked fine, the database is the XTreme sample db in access Andrew Baines
Chase International
 
Andrew,

Thanks, but we aren't working with the SQL designer. We are working with SQL expressions within CR.

Ken Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I know. However, the ODBC is the same. Therefore the Access ODBC is able to interpret the function fine.
I've got substring working with non-memo fields, it just collapses when you try and shorten a memo field.
Andrew Baines
Chase International
 
synapsevampire,

As soon as I read your first post here I tried starting w/ a new report. I've used every syntax possible, quotes around the table and field, single quotes, no quotes. Tried w/ ODBC and logging in directly to the oracle server and all I get is the error messages. Checked the placement of all my commas, parentheses, everything. Used existing fields first to see how they default in.

Can you tell me what your driver is when you log into oracle directly? that's the only thing I can think of because obviously this should be working. Thanks for everyone's help.
 
The driver is going to depend on what version of Oracle you are using. I am runing orcale 8i. I am using Micosoft ODBC Drive for Oracle v2.573 and CR Oracle8 v3.11 by Intersolv.. Brian
 
Try this:

Create a NEW report on that table, but do NOT include the field that you wish to SUBSTR or Crystal will error on you.

Now do the SQL Expression akin to this:

substr(SOLAUDITLOG.TAG,1,100)

Note I do NOT use curly braces nor fn.

This works on 2 different verions of Oracle for me, and in both the native and CR ODBC.

I think that it was failing because you were placing the field in the report, this screws Crystal up for some reason.

If this doesn't work, we'll have to physically go into your hard drive and truncate some bits...

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top