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

Need help with Summary count 1

Status
Not open for further replies.

manlia

Technical User
Jan 19, 2004
12
US
I'm using Crystal Report 8.5.
I did a summary count from a field which returns no records. However, the count returns 1 although there is no records. I can't figure it out why it's counting as 1 although there is no records returned.

I'm counting a date field that is put on the detail section. Here is the formula:
If {table.numberfield}<100 then {Todate?} else
Date (0000,00,00).

{ToDate?} is the user defined parameter range.

Any help is greatly appreciated.
 
Check to make sure that there is not a blank field in {table.numberfield} in the database.
 
Your formula always has a result, since each occurrence of date(0,0,0) will be counted as 1. Add in a second formula:

if {@firstformula} = date(0,0,0) then 0 else 1

Then sum this to get a count of dates that are not blank.

-LB
 
Hi lbass,

Thanks for your feedback. However, I'm still getting a count as 1 althought the records now obviously shows &quot;0.00&quot;. Any idea?
Thanks
Lia
 
I'm sorry. Please disregards my previous reply. I think I got it. I have to use &quot;Sum&quot; instead of &quot;Count&quot;
Thanks a bunch!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top