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

Record Selection not selecting enough records

Status
Not open for further replies.

crystalpro

Technical User
Jan 22, 2002
95
US
Using Peachtree Premium 2009, Pervasive SQL database and Crystal Reports v9.

I created a report to list the invoices, quantity, unit price and invoice amount by sales rep. My client wants to eliminate two inventory items from the report. I added the record selection
not({lineitem.itemid} in ["736", "1462"]). When I ran the report with the record selection change, all the negative invoices(credit memos) were excluded from the report, too. I need the negative invoices on the report.

I checked the invoices excluded and they do not include the inventory items "736" or "1462", so they should include the invoices on the report.

Here is the record selection formula:
{?Password} = "ml1988" and
{JrnlHdr.JrnlKey_Journal} = 3 and
{Customers.CustomerID} <> "dot foods" and
{Customers.CustomerID} <> "market day" and
{Customers.Customer_Type} <> "direct" and
{JrnlRow.RowType} = 0 and
{@Amount} <> 0.00 and
{JrnlHdr.TransactionDate} = {?Report Date Range} and
not ({LineItem.ItemID} in ["1462", "736"])

{@amount} = If {Chart.AccountID} in ["6320","6340","6380"] then ({JrnlRow.Amount}* -1) else
({JrnlRow.Quantity}* {LineItem.PriceLevel1Amount})

The negative invoices excluded had a gl account of "6320".

The group headers are suppressed, but nothing else is suppressed.

Why is my report not including the negative invoices?
I'd be happy to email the report if someone would like to review it.

Thank you for your help.
 
Can you verify that it was working before you added the last line? Was the {@amount} formula already there?

-LB
 
Yes. The report was working before the last record selection line was added. I printed the report before and after the additional record selection. The number of records selected is significantly reduced.
 
If I use the {JrnlRow.RowDescription} to exclude the necessary inventory items, then the report works like it should (keeping the invoices with no inventory item id, but excluding the two inventory items).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top