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

group selection not excluding records

Status
Not open for further replies.

swhitten

Technical User
Sep 3, 2002
191
US
I am writing an inventory report in Crystal 9. I have this scenario:

Widget A - Warehouse 1 - Qty 1,000 on hand
Widget A - Warehouse 2 - Qty -500 on hand (negative)
Net 500 on hand

Widget B - Warehouse 1 - Qty -2,500 on hand (also negative)
Widget B - Warehouse 2 - Qty 500 on hand
Net -2,000 (negative)

Widget C - Warehouse 1 - Qty -3,000 on hand (negative)

There are detailed transactions behind each of the rows shown above. (The detail row shows the inventory transaction, the date, how many items were received, how many were sold, and the net remaining, which, when subtotaled, becomes the quantity shown above. Some of those detail rows have negative net remaining quantities, were the quantity sold is greater than the quantity received.) My report hides the details and only shows the Location summary row as shown above.

Here is my issue. I want to include the two rows for Widget A as shown, because the NET of the two locations is a positive number. I want to exclude the two rows for Widget B and the one row for Widget C, because the net of all the transactions is negative.

Originally, I suppressed detail rows where the net quantity (quantity sold is greater than quantity received) was negative. BUT, this incorrectly eliminates items where the net of all transactions, all locations is positive.

So I added a group selection formula to only select groups where the total for the item number is > 0. This correctly includes the rows for Widget A, showing those lines. But the report no longer foots; it seems to be including the other negative details in the grand total, even though the group itself doesn't seem to be included.

What am I missing? Thanks in advance!
 
You aren't missing anything, crystal is. The groups you have excluded are still in the totals and the only ways to fix this are to use running totals or variables evaluated based on a formula at the group level.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"making predictions is tough, especially about the future" - Yogi Berra
 
I inserted a running total, and that worked. So you're saying that what I THOUGHT I was seeing is what I REALLY was seeing. The groups are excluded in that they don't show on the report, but the detail is still included in the totals???? That was not my understanding of group selection :( And that's not how record selection works???

Thank you so much for your help!!!
 
You got it...group selection includes unselected groups in the totals.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"making predictions is tough, especially about the future" - Yogi Berra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top