0
votes

I am working on a crystal report. It has the following fields: item, component, warehouse, and quantity on hand. Please see detail view below:

Item Components Warehouse QuantityOnHand

AZ1 153-54 100 31.00

AZ1 153-54 200 28.00

AZ1 153-54 Total 153-54 59.00

AZ1 153-84 100 31.00

AZ1 153-84 200 27.00

AZ1 153-84 Total 153-84 58.00

AZ1 153D89 100 31.00

AZ1 153D89 200 26.00

AZ1 153D89 Total 153D89 57.00

After I hide the details, I will get the following view:

Item Components Warehouse QuantityOnHand

AZ1 153-54 Total 153-54 59.00

AZ1 153-84 Total 153-84 58.00

AZ1 153D89 Total 153D89 57.00

I am trying to identity the Components that have the lowest QuantityOnHand for every item. When I use the MIN function in crystal, it does not work. In this example, I would like to only show

AZ1 153D89 Total 153D89 57.00

Any help would be appreciated.

Thanks

1
AZ1 153-54 1 31.00<br/> AZ1 153-54 2 28.00<br/> AZ1 153-54 Total 153-54 59.00<br/> AZ1 153-84 1 31.00<br/> AZ1 153-84 2 27.00<br/> AZ1 153-84 Total 153-84 58.00<br/> AZ1 153D89 1 31.00<br/> AZ1 153D89 2 26.00<br/> AZ1 153D89 Total 153D89 57.00<br/>Dynamic Drinks

1 Answers

0
votes

Store the summary values into array and then apply min condition on array.

If min of array is equal to any value then dont supress else supress. Apply this condition on group footer

Try this:

Create a formula @Store

`Shared StringVar Array store;

store:=store+ToText(QuantityOnHand);`

Place above formula after QuantityOnHand

Now create a supress formula for th section that you want to hide as

`EvaluateAfter({@Store}); Shared StringVar array store;

if QuantityOnHand =Min(Store) Then false Else true`