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!

Record Selection Formula 1

Status
Not open for further replies.

bamundsen

IS-IT--Management
Dec 5, 2001
58
US
I am using Crystal Reports 8.5 and SQL Server 2000
I have a report that creates a Sales Total for all products for a user specified date range. The record selection only has the formula which calls for a date range. The current formula is:
{orders.odate} in {?Beg Date} to {?End Date}

I have discovered that this report is returning inaccurate data. We have a field in our orders table that is populated with credit card transaction id's. If the credit card transaction failed, the field is given a null value. However, the order still has an order amount attached to it, so the order is included in the Sales Total. How can I tell the record selection to exclude any orders that have a null value in the transaction id field (that field is oreferenceid). I have tried:
If not isnull {orders.oreferenceid} then {orders.odate} in {?Beg Date} to {?End Date}

Thank you very very much

Brett
 
Try:

(
not(isnull({orders.oreferenceid}))
and
{orders.odate} in {?Beg Date} to {?End Date}
)

-k
 
That worked pefectly. Thank you synapsevampire
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top