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!

Format the Details section to Suppress by Formula

Status
Not open for further replies.

giswzrd

Technical User
May 8, 2001
11
US
I am writing a report to list Duplicate Coordinate Pairs(x&y Coordinates). I sort my data by "X_COORD" And
Format the Details section to Suppress by the following formula:

({Aat.X_COORD}<>Previous ({Aat.X_COORD}) AND {Aat.Y_COORD}<>Previous ({Aat.Y_COORD})) OR

({Aat.X_COORD}<>NEXT ({Aat.X_COORD}) AND {Aat.Y_COORD}<>NEXT ({Aat.Y_COORD})) OR

{Aat.CABLEID}=Previous ({Aat.CABLEID})

As you can see in the resulting report records that do not contain duplicate coordinate pairs print also.

Data Source

X_COORD Y_COORD CABLEID CT_CABLE_ CT_CABLE_I

2,209,646.00 257,920.50 170 537 540
2,209,646.00 244,646.70 1,053 3,668 3,758
2,209,646.00 253,359.20 1,815 4,596 4,692

2,278,080.00 298,076.90 19,976 11,955 12,142
2,278,080.00 298,076.90 24,462 16,429 16,670

2,279,105.00 297,720.40 23,212 15,180 15,389
2,279,105.00 297,720.40 24,458 16,425 16,666

2,279,800.00 297,857.00 20,179 12,157 12,347
2,279,800.00 297,857.00 24,445 16,412 16,653

Result Report

X_COORD Y_COORD CABLEID CT_CABLE_ CT_CABLE_I

2,209,646.00 244,646.70 1,053 3,668 3,758

2,278,080.00 298,076.90 19,976 11,955 12,142
2,278,080.00 298,076.90 24,462 16,429 16,670

2,279,105.00 297,720.40 23,212 15,180 15,389
2,279,105.00 297,720.40 24,458 16,425 16,666

2,279,800.00 297,857.00 20,179 12,157 12,347
2,279,800.00 297,857.00 24,445 16,412 16,653

Anybody have a clue?
 
It looks like the formula will only suppress when there are three or more records with the same X_COORD.

Which record do you want to suppress - the first, second, third...X? What's the logic that you want to re-produce?

DjangMan
 
All I want in the report are records with identical x and y coordinates.

Thanks
 
Here is an idea.

In the details section you put the following formula:-

StringVar sFirst ;
StringVar sNext ;

If Not NextIsNull({Aat.X_COORD}) Then (
sFirst := Totext({Aat.X_COORD}) & ToText({Aat.Y_COORD}) & Totext({Aat.CABLEID}) ;
sNext := ToText(Next({Aat.X_COORD})) & ToText(Next({Aat.Y_COORD})) & ToText(Next({Aat.CABLEID})) ;

Not (sFirst = sNext))
Else
False
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top