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

How do I achieve this 1

Status
Not open for further replies.

Cpreston

MIS
Mar 4, 2015
972
GB
I have a report that display journey information.
It is grouped by order number and shows drop numbers.
However, our system thinks that each new order number is a new drop so gives it the next number for a drop.
However the drop may be at the same address just a different order number.

Is there anyway I could get the numbers to look at the previous post code or customer number and then if it is the same then not show the drop number

Example

Orderno CustNo Pcode DropNo
1234 1 LS1 1
1235 1 LS1 2 (take this one out)
1236 1 LS1 3 (take this one out)

0001 2 DF3 4 (either make this 2 or keep 4)

Any ideas please
 
Hi,

What does you formula for drop look like?

"However, our system thinks that each new order number is a new drop so gives it the next number for a drop."

BTW, your system does not think. That's your job!

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
Hi

Good point I will re-phrase

However, our system is programmed to give each individual order number a new drop numnber so gives it the next number for a drop."

It does not use a formula in the report this is a direct field from the table. Thanks

Orderno CustNo Pcode DropNo
1234 1 LS1 1
1235 1 LS1 2 (take this one out)
1236 1 LS1 3 (take this one out)

0001 2 DF3 4 (either make this 2 or keep 4)
 
However, our system is programmed to give each individual order number a new drop numnber"
"this is a direct field from the table"

The programming is therefore incorrect!

If you want to correct the report, post generation, by removing the DropNo, you must test the CustNo against the previous CustNo. If they are identical, the REMOVE Else current DropNo+1 (you have to store it, that's why I call it current DropNo)

Short of reprogramming this report, I would REPLACE the DropNo with the previous value rather than REMOVE.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
Hi

Could you give me an example of how to do this in a formula please.

Thanks
 
Hi

Still stuck on this one, any chance of an example of the code please.

Thanks
 
Suppress the drop number field with a formula:

Not onfirstrecord and
Custno = previous(custno) and
Pcode = previous(pcode)

-LB
 
Thanks Ibass for the example. It works in t it supresses if the cuetno and Pcode are the same.

So if I have an order with 10 drops I am getting and the rest supressed which is correct. DO you know of a way of either making the next drop no (in this case is 8)to be a 3 or the same as the drop number onfirst record (so I would have 1222222899 or 12 34 ) Hope that makes sense.

1
2
8
9
 
Insert a running total that does a distinct count of each order, evaluates on change of a formula:

Onfirstrecord or
Custno<>previous(custno) Or
Pcode<> previous(Pcode)

Reset never.

Use this instead of the dropno.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top