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

excluding multiple records with same one field

Status
Not open for further replies.

aamkumar

Programmer
Apr 3, 2007
18
US
If I have two records where one of the column field is having same value, I have to exclude all the records if status in column 2 is N for any of the records

Col1 Col2 col3
123 Y US
123 Z UK
123 N UK

For the above case need to exclude all the 3 records as status is N for one of the records Col2

 
Group on All 3 colums then in record selection----group--slect Col2<>"N" besure to keep all the details in Group footer
 
sorry this thing is not working it is still showing me records for col2 that have value <>N ie Y and Z and which GRP footer should I drop the detail section in
 
First insert a group on {table.col1}. Then create a formula {@N}:

if {table.col2} = "N" then 1

Then go to report->selection formula->GROUP and enter:

sum({@N},{table.col1}) = 0

Note that if you then want to do summaries that cross groups, you will need to use running totals, since non-group selected records would contribute to the more usual inserted summaries.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top