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!

Suppressing extra data in the list

Status
Not open for further replies.

LinPro

Programmer
Jun 25, 2003
120
US
Hi All

Crystal XI/SQL Server with Epicor Application.

I am trying to display only Quantity on Hand and the Bin Number if the Quantity requested is equal or less than. However I only want each row to display as requested.

Example 1
Qty Requested = 10

QtyonHand Bin#
200 ZYX123
20 ABC222
-4 ABC571
As example 1 show there are 3 rows, I only want the first row to display in the report - because it has already satisfy the criteria.

Example 2
Qty Requested = 210

QtyonHand Bin#
200 ZYX123
20 ABC222
-4 ABC571
As example 2 show there is again 3 rows, but I want only the first and second row to show - because it satisfy the criteria.

Please assist.

Lind
 
Create these formulas:

//{@reset} to be placed in the group header (whatever field has the associated quantity requested, maybe an item ID):
whileprintingrecords;
numbervar x;
if not inrpeatedgroupheader then
x := 0;

//{@accum} to be placed in the detail section:
whileprintingrecords;
numbervar x;
numbervar y := x;
if x < {?Qty Req} then
x := x + {table.qtyonhand};

Then go into the section expert->details->suppress->x+2 and enter:

whileprintingrecords;
numbervar x;
numbervar y;
y = x //note no colon

This assumes that quantity requested is set up as a parameter. If it is not a parameter, you can substitute a field {table.qtyrequested} as long as it has the same value for each detail record within the group.

-LB
 
Thanks LB, I did get part of it but the y=x was the part that I was missing.

Lin
 
Yes. I had it working last night at home. But with no data I could check it until I got into work.

thanks again

Lin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top