Calc's in report footer (1 Viewer)

legendv

Registered User.
Local time
Today, 04:14
Joined
Mar 18, 2002
Messages
99
I want to count the number of orders due for today at the end of a report. The report lists orders due for past future and present dates, but I want to count only the orders due for today.

So in the report footer there is a textbox with a control set as:
=IIF([orderdate]=Date(),Count([orderkey]),0)

There is at least one order that is due today, however it still results in 0 as a result. I'm not getting any syntax error msgs, but I'm not ending up with what I need.

Any suggestions?
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 23:14
Joined
Feb 19, 2002
Messages
43,233
=Sum(IIF([orderdate]=Date(),1,0))

The IIf() returns 1 if the orderdate = today, otherwise it returns 0. The Sum() sums the 1's and 0's.
 

legendv

Registered User.
Local time
Today, 04:14
Joined
Mar 18, 2002
Messages
99
Thanks Pat, again, and again, and again.
 

Users who are viewing this thread

Top Bottom