Show only clients with balances

J

JimN

Can a report based on a query that shows orders with cost and payments just
print those records where the balance, which is calculated in the report, is
greater than zero?
 
O

Ofer

Create the criteria in the record source of the report

SELECT TableName.cost , TableName.payments , [payments] - [cost] AS Balance
FROM TableName
WHERE ([payments] - [cost]) >0
 
J

JimN

The balance calculation comes from 2 sub-reports, sales cost and payments.
There are clients with zero balance and actually with negative balances. I
just want to print the clients with a balance greater than zero.
 
J

JimN

Sorry I did not complete the picture. The balance calculation comes from 2
sub-reports, sales cost and payments. There are clients with zero balance and
actually with negative balances. I just want to print the clients with a
balance greater than zero.

Ofer said:
Create the criteria in the record source of the report

SELECT TableName.cost , TableName.payments , [payments] - [cost] AS Balance
FROM TableName
WHERE ([payments] - [cost]) >0

--
\\// Live Long and Prosper \\//
BS"D


JimN said:
Can a report based on a query that shows orders with cost and payments just
print those records where the balance, which is calculated in the report, is
greater than zero?
 
D

Duane Hookom

I repeat "You must be able to calculate the balance in your report's record
source." Apparently you know how to create a query for your subreports that
list cost and payment details. Convert these record sources to totals
queries and include them in your main report's record source.
 
Top