can't get same last names to list in report

G

Guest

Can someone help me?

I have a report that is derived from a query. In this particular query
there is:
Last Name, First Name, Student ID and Student Average. There are some
students that have same last names, but different Student ID's.

In my report, I have it to display the four categories from A to Z by Last
Name. I also have a text box to display the rank, so that is set to "=1".
The problem I am having is that the report will not show duplicate last
names, even though they have different Student ID's. I have the properties
of all five text box fields for "Can Shrink and Can Grow" to yes and Hide
Duplicates set to No.

Is there something that I am doing wrong??

Anyone that has any tips, it would be really appreciated.
 
Joined
Nov 9, 2005
Messages
17
Reaction score
0
can you paste your query here? my guess is that you selected distinct records when you were creating that ...

also you may want to just try debugging and sorting them by the StudentID number just to see if all of your names are getting returned by the query
 
M

Marshall Barton

gcapp said:
I have a report that is derived from a query. In this particular query
there is:
Last Name, First Name, Student ID and Student Average. There are some
students that have same last names, but different Student ID's.

In my report, I have it to display the four categories from A to Z by Last
Name. I also have a text box to display the rank, so that is set to "=1".
The problem I am having is that the report will not show duplicate last
names, even though they have different Student ID's. I have the properties
of all five text box fields for "Can Shrink and Can Grow" to yes and Hide
Duplicates set to No.


The repoart's Sorting and Grouping needs two entry's. The
first is the name field with **no** Group Header or Footer.

The second entry would be the ID field with the Group Header
set to Yes. Place the name text boxes in this header
section.
 
G

Guest

Marshall,

I appreciate the feedback. However your suggestion did not work or I'm not
doing it correctly. Let me be more specific.

My report feeds off a query which is derived from another query. There are
calculation fields in the final query in which the report is generated from.
In this last query there are four fields that I am pulling into the report:

StudentID
LastName
FirstName
Avg

On the report itself, which is to list all the students from A to Z (by last
name), the Sorting and Grouping is set to LastName (listed first) with Group
Header set to No and Group Footer set to Yes; the second listing is FirstName
which is set to No on Group Header and Group Footer. I added a text box to
show the rank of the students and put "=1" in it. All five text boxes are in
the LastName footer section.

It produces the report condensed which is good but there are two things it
will not do:

1) List any LastName that has the same last name and
2) List any Avg that has the same average.

So basically, if there are records that have the same last name or average
it will not list them. However if there are two FirstName that are the same
it will show them.

If I need to move a specific text box to either the Detail section or do
something else, your suggestions would be greatly appreciated. I'm trying to
find a consistent factor as to why this error is occurring, but I'm having no
luck.

Thanks
 
M

Marshall Barton

You can not total individuals in the last name footer if
there are multiple people with the same last name.

If there will never be multiple people with both the same
last and first names, you could put the total in the first
name footer. However, John Smith might object to you making
this simplifying assumption ;-)

In order to sort by the name, you need an entry in sorting
and grouping with the name. I suggest that you use the
expression =LastName & "," & FirstName. Alternatively, you
could use two entries as you have now, LastName in the first
one and FirstName in the second entry. None of these would
have a header or footer section.

To avoid the problem of duplicate names, you need a third
entry in sorting and grouping that is guaranteed to be
unique. The StudentID field will suit this purpose. This
is the group that needs to have the group header and/or
footer section because the other levels do not identify a
single person.

Note that this entire discussion is based on the objective
of totaling something over one or more records for each
student. At one point in this thread you mentioned
something about categories, but I don't see a category field
in the lost of fields.

I also have no idea what you are trying to total because it
appears that the only total is some kind of average that was
calculated in the query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top