Report group header ordering ...

J

Jamie Risk

Long ago I learned that using somebody's surname to index a table was a bad
idea. My tables all have an autonumbered index which I use as a reference
whenever I link tables.

My problem then is when I create a report, one of the useful group headers
is somebodies surname. My data set recently included two people with the
last name so my report spilled out data for both people with the same last
surname. This in hindsight is quite expected. Instead I can group the
headers based on the Table_ID, so that each individual in the report gets
the information they need.

How do I sort a group header on data other than the group header? i.e. I
want to group by [Teacher].Teach_ID, but have the group sorted by
[Teacher].[Surname].
 
D

Dirk Goldgar

Jamie Risk said:
Long ago I learned that using somebody's surname to index a table was
a bad idea. My tables all have an autonumbered index which I use as
a reference whenever I link tables.

My problem then is when I create a report, one of the useful group
headers is somebodies surname. My data set recently included two
people with the last name so my report spilled out data for both
people with the same last surname. This in hindsight is quite
expected. Instead I can group the headers based on the Table_ID, so
that each individual in the report gets the information they need.

How do I sort a group header on data other than the group header?
i.e. I want to group by [Teacher].Teach_ID, but have the group sorted
by [Teacher].[Surname].

In the Sorting & Grouping dialog, create a sort field for Surname,
without group header or footer, and place this above the Table_ID group
field.
 
L

Larry Daugherty

Hi Jamie,

You can concatenate the surname with first and middle in the underlying
query to get the sort you want: ConFullName: {Surname] & ", " &
[FirstName] & " " & [Middle]

In your Sorting and grouping sort and group on ConFullName but refer to the
actual to the names you've been using all along in the report.

HTH
 
J

Jamie Risk

This is close to what I actually did.

Instead of concatenating on just the names, I added the table ID number as
well to be sure all the John Smiths were treated differently.
i.e. SELECT [surname]&[name]&[ID]

- Jamie

p.s. "Why would you name your kid John? Every Tom, Dick and Harry is called
that." S. Goldwynn

Larry Daugherty said:
Hi Jamie,

You can concatenate the surname with first and middle in the underlying
query to get the sort you want: ConFullName: {Surname] & ", " &
[FirstName] & " " & [Middle]

In your Sorting and grouping sort and group on ConFullName but refer to
the
actual to the names you've been using all along in the report.

HTH
--
-Larry-
--

Jamie Risk said:
Long ago I learned that using somebody's surname to index a table was a bad
idea. My tables all have an autonumbered index which I use as a
reference
whenever I link tables.

My problem then is when I create a report, one of the useful group
headers
is somebodies surname. My data set recently included two people with the
last name so my report spilled out data for both people with the same
last
surname. This in hindsight is quite expected. Instead I can group the
headers based on the Table_ID, so that each individual in the report gets
the information they need.

How do I sort a group header on data other than the group header? i.e. I
want to group by [Teacher].Teach_ID, but have the group sorted by
[Teacher].[Surname].
 

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