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

Value Not Being Displayed on Report...Please Help

Status
Not open for further replies.

jhein

Programmer
Feb 17, 2003
46
0
0
CA
I have a formula set up that basically says:

If COUNT(MyRecordsetName.Value) = 0 THEN
0
ELSE
(MyRecordsetName.Value)

This doesn't seem to be working. When the recordset does not return a recordset, I would like to have 0 displayed on the report, but when a recorset is returned I would like to display a value from that recordset. Any ideas?

Thanks in advance!
 
JHein,
Try using the Crystal RecordNumber funtion, under Print State in the Function tree. Something like this should work:

IF RecordNumber = 0
THEN 0
ELSE {MyRecordSet.Value}

Good Luck!
JD
 
There is no such thing as a 0 RecordNumber. Or a count of a non-returned field being equal to zero. A count of a non-featured field is null.

Use an approach like this:

If IsNull({@YourCountingFormula}) THEN
0
ELSE
(MyRecordsetName.Value)

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top