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

Filtering and Counting everything including null values

Status
Not open for further replies.

ginkoba

Technical User
Jan 29, 2009
60
I have a table with some null values in certain fields. I want to count all values as 1 including null values and fields that hold " ".

This is what I'm trying to do but getting it all wrong:

IsNull({@datetime})
and
{@datetime} >= {?Start}
and
{@datetime} <= {?End}

This does not work as I'm still missing 2 persons that did not have hours within the month. I want to be able to see those 2 individuals. I left joined the tables but still did not see them.

I have 4 tables in this report. Report summary below:

Dept. Heads HrsAvailable HrsWorked
green 10 200 30
blue 5 100 20
yellow 20 1000 300

Dept. "green" should be 12 heads in the count but I only see 10 even when I left join it. How can I do a running count to include those 2 records that are missing?

Any help will be much appreciated.
 
You would have to explain how the specific tables are linked, and also identify the fields used from each table, using the convention {table.field}.

For one thing, your record selection formula should probably be:

(
(
IsNull({@datetime}) or
{@datetime} = datetime(0,0,0,0,0,0)
) or
(
{@datetime} >= {?Start} and
{@datetime} <= {?End}
)
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top