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

Need to find by all CAPITAL letters or field = 0???

Status
Not open for further replies.

fort

Programmer
Aug 28, 2002
14
US
I am using Windows 2000 and Crystal Reports 8. How do you determine a database field with all CAPITAL letters?? Also--trying to determine a field that is either null or a field = 0?? Any ideas??

Thanks
 
In Report Options, toggle case insensitive off.

Make your Selection Criteria:

UpperCase({Field}) = {Field}

A numerical field with a value of either null or 0 will be treated differently. Refer to null fields as IsNull({Field}) and zero fields as {Field} = 0.

For string fields, when searching for nulls, use both IsNull({Field}) and {Field} = ''.

Naith
 
I had already tried both of these solutions and neither one worked. I just can't figure what I am doing wrong on either one. Any more ideas??
Thanks!!
 
Which 'both' didn't work? There's three pointers there.

Are you saying that when you turn off Case Insensitive SQL Data and then do an uppercase search, it's ineffective?

Naith
 
Crystal is way too handy about &quot;making up for your mistakes&quot; and assumes if you say something is <> to &quot;word&quot; that you mean <> &quot;word&quot; and <> &quot;WORD&quot; and <> &quot;WoRd&quot; etc.

To get around this use the strcmp funtion along with UpperCase as in:

strcmp(UpperCase({Field}),{Field},0) will return 0 if they are identical (including case) and -1 or 1 if they are not.

Lisa
 
Naith--
Thanks for the help on the uppercase!! I checked on turning off the Case Insensitive SQL Data (again), and it did take care of the problem.
Thanks again!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top