Group:  Microsoft Access ยป microsoft.public.access.reports
Thread: Missing names

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Missing names
"jema53" <u27301[ at ]uwe> 29.09.2006 19:27:46
I created a report that's based on a query. The query itself is based on
Employees table, Courses Table and a junction table that captures the
employee's ids and courses taken.

The problem with the report is that when a Last Name is repeated, meaning
there's another employee with the same Last Name, albeit a different Employee
Id (primary key), the last name only appears once and the courses are put
together for both of them.

The report is printing like this:

Smith John New Employee Orientation
Excel 1
Word - Getting started
New EmPloyee Orientation
Word - Getting started

The report Should look like this:

Smith John New Employee Orientation
Excel 1
Word - Getting started
Smith Sam New EmPloyee Orientation
Word - Getting started

Any ideas? Thanks. JM

Re: Missing names
"Larry Linson" <bouncer[ at ]localhost.not> 29.09.2006 20:50:44
Sounds as if you are Grouping in the Report (or, perhaps, Joining in the
Query) only on Last Name. Use the Employee ID or the combination of Fields
that make up a full name, instead. Using Names for identification isn't a
good practice because there are so many duplicates.. what happens when you
hire two John Peter Smiths, even if you use the full name?

Larry Linson
Microsoft Access MVP


"jema53" <u27301[ at ]uwe> wrote in message news:670778acd785d[ at ]uwe...
[Quoted Text]
>I created a report that's based on a query. The query itself is based on
> Employees table, Courses Table and a junction table that captures the
> employee's ids and courses taken.
>
> The problem with the report is that when a Last Name is repeated, meaning
> there's another employee with the same Last Name, albeit a different
> Employee
> Id (primary key), the last name only appears once and the courses are put
> together for both of them.
>
> The report is printing like this:
>
> Smith John New Employee Orientation
> Excel 1
> Word - Getting started
> New EmPloyee Orientation
> Word - Getting started
>
> The report Should look like this:
>
> Smith John New Employee Orientation
> Excel 1
> Word - Getting started
> Smith Sam New EmPloyee Orientation
> Word - Getting started
>
> Any ideas? Thanks. JM
>


Re: Missing names
"Sprinks" <simon.gunning[ at ]ntlworld.com> 29.09.2006 20:50:47
Looks like you are grouping the report on Lastname. Try just sorting on
Lastname, then Firstname and then put your Grouping on your primary key
Customer id with a sort also, ( in case there are many 'John Smiths').
So you should end up with 3 rows in your sorting and grouping window,
the last one being the Primary key with the grouping set.

..

Re: Missing names
Marshall Barton <marshbarton[ at ]wowway.com> 29.09.2006 21:02:59
jema53 wrote:

[Quoted Text]
>I created a report that's based on a query. The query itself is based on
>Employees table, Courses Table and a junction table that captures the
>employee's ids and courses taken.
>
>The problem with the report is that when a Last Name is repeated, meaning
>there's another employee with the same Last Name, albeit a different Employee
>Id (primary key), the last name only appears once and the courses are put
>together for both of them.
>
>The report is printing like this:
>
>Smith John New Employee Orientation
> Excel 1
> Word - Getting started
> New EmPloyee Orientation
> Word - Getting started
>
>The report Should look like this:
>
>Smith John New Employee Orientation
> Excel 1
> Word - Getting started
> Smith Sam New EmPloyee Orientation
> Word - Getting started


In the report's Sorting and Grouping, change the group to
use an expression (instead of a field). The expression
needs to include the first name if you want those sorted
when the last name is the same. You should probably also
add the employee ID just in case both the first and last
names are the same.

=[lastname] & "," & [firstname] & [Employee ID]

--
Marsh
MVP [MS Access]

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net