Hiding Duplicates

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

I have a report which uses a query pulling data from two
tables. Take the following example: Tables Salesman and
Sales. Salesman is generic information about the indiviual
and Sales is information about the sales the Salesman has.
My Report is something like this:

SalesmanName Region CustomerName SaleDate SaleAmt
Fred 1 ACE Utilities 10/12/03 $1000.00
Fred 1 Jones HairPLace 10/12/03 $1200.00
Fred 1 Jim's Electric 10/15/03 $800.00
Jim 1 TheMall 10/11/03 $2500.00
Jim 1 Fred's Plumbing 10/12/03 $1500.00
Alice 2 Stacie's Place 10/12/03 $5000.00
Alice 2 Steve's Garage 10/15/03 $7500.00

I would want it to read as follows:

SalesmanName Region CustomerName SaleDate SaleAmt
Fred 1 ACE Utilities 10/12/03 $1000.00
Jones HairPLace 10/12/03 $1200.00
Jim's Electric 10/15/03 $800.00
Jim 1 TheMall 10/11/03 $2500.00
Fred's Plumbing 10/12/03 $1500.00
Alice 2 Stacie's Place 10/12/03 $5000.00
Steve's Garage 10/15/03 $7500.00

To address this I set the fields Hide Duplicates property
for each field I did not want duplicated in the report.
The problem I am having is it reads as follows:

SalesmanName Region CustomerName SaleDate SaleAmt
Fred 1 ACE Utilities 10/12/03 $1000.00
Fred Jones HairPLace 10/12/03 $1200.00
Fred Jim's Electric 10/15/03 $800.00
Jim TheMall 10/11/03 $2500.00
Jim Fred's Plumbing 10/12/03 $1500.00
Alice 2 Stacie's Place 10/12/03 $5000.00
Alice Steve's Garage 10/15/03 $7500.00

I would like it to display everything again when it starts
a new salesman.

I hope that's clear. The strange thing is, I have done
reports like this many times and did not have this
problem. If anyone has any suggestions, I would greatly
appreciate the help!
 
Kevin,
In report design, use the HideDuplicates = Yes property for your Name and
Region fields.
 
Kevin said:
I have a report which uses a query pulling data from two
tables. Take the following example: Tables Salesman and
Sales. Salesman is generic information about the indiviual
and Sales is information about the sales the Salesman has.
My Report is something like this:

SalesmanName Region CustomerName SaleDate SaleAmt
Fred 1 ACE Utilities 10/12/03 $1000.00
Fred 1 Jones HairPLace 10/12/03 $1200.00
Fred 1 Jim's Electric 10/15/03 $800.00
Jim 1 TheMall 10/11/03 $2500.00
Jim 1 Fred's Plumbing 10/12/03 $1500.00
Alice 2 Stacie's Place 10/12/03 $5000.00
Alice 2 Steve's Garage 10/15/03 $7500.00

I would want it to read as follows:

SalesmanName Region CustomerName SaleDate SaleAmt
Fred 1 ACE Utilities 10/12/03 $1000.00
Jones HairPLace 10/12/03 $1200.00
Jim's Electric 10/15/03 $800.00
Jim 1 TheMall 10/11/03 $2500.00
Fred's Plumbing 10/12/03 $1500.00
Alice 2 Stacie's Place 10/12/03 $5000.00
Steve's Garage 10/15/03 $7500.00

To address this I set the fields Hide Duplicates property
for each field I did not want duplicated in the report.
The problem I am having is it reads as follows:

SalesmanName Region CustomerName SaleDate SaleAmt
Fred 1 ACE Utilities 10/12/03 $1000.00
Fred Jones HairPLace 10/12/03 $1200.00
Fred Jim's Electric 10/15/03 $800.00
Jim TheMall 10/11/03 $2500.00
Jim Fred's Plumbing 10/12/03 $1500.00
Alice 2 Stacie's Place 10/12/03 $5000.00
Alice Steve's Garage 10/15/03 $7500.00

I would like it to display everything again when it starts
a new salesman.

I hope that's clear. The strange thing is, I have done
reports like this many times and did not have this
problem.

HideDuplicates always has this kind of problem, it's too
whimpy for one field to know what's going on in another
field. It doesn't even know when a new group starts.

To get the appearance you want, you have to create a group
(View - Sorting and Grouping menu) on the name field with
header section. Move the name and region controls to the
group header section.

To get the group header to display on the same line as the
first detail, add a line of code to the header's Format
event procedure:
Me.MoveLayout = False
 
Kevin,
Sorry, I missed the tail end of your first post.

But, I would think that a saleperson only sells in one region.
True/False?

If that's so, then you shouldn't need to break on region, just on the
name. Then, HipeDupes would work the way you want.
If Fred only sells in region 1, then Fred and Region 1 are synonymous...
--
HTH...
Al Campagna
Candia Computer Consulting
Candia, NH
 
I knew how to fix this! I guiess I just had a brain fart
as they say!

Thanks for the help!

Kevin
 
Back
Top