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

Not Used Filed

Status
Not open for further replies.

iansmithwolves

Technical User
Jan 24, 2003
53
GB
I am runnig a report which show the number of times an agent had used a certain field in a database. If that item does not appear I get a blank report. What I want is a field which says "Item not used" on the blank report. Any help please would be appreciated.
 
Which Crystal? It makes a big difference to what's possible.

What I suspect you have is a null value. Having come to Crystal from mainframe languages, I got a 'cultural shock' when encountering null. It means 'no data': Mainframe languages mostly treat this as the same as zero.

It is actually a finer shade of meaning, the difference between 'Yes, we have no bananas' and 'I don't know how many bananas we have, it could be some, it could be zero'. In Crystal, the entry is 0 or null and can be tested for.

Note that Cyrstal assumes that anything with a null means that the field should not display. Always begin with something like
Code:
if isnull({your.field}) then "Item not used"
else {your.field}

If you are using table-to-table links, you can get a similar problem. Use 'left outer' for cases where an account may have transactions but also may have none. If you use a normal join, accounts without transactions get left out.

Madawc Williams (East Anglia)
 
Thanks Madawc, thats worked a treat.

Regards

Ian Smith
Wolverhampton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top