grouping order in a report

G

Guest

hey... i have a report whose detail section is based on three departments so
the report is 3 pages for that, plus two pages for a report footer and a
cover page report header. the controls in this report are summary data, so
no specific records will show up on the report. i've asked this question on
other sites and almost all of the answers i get are about sorting the
records. what i need is to specify a sort order for the GROUPS that is
neither ascending or decending. if the three departments are a, b and c, i
can get them to print either in ascending or decending order. however, i
would really like it to be b-a-c to mimic the excel spreadsheet this was a
copy from originally. it's not THAT big a deal to rearrange the papers
before i staple them, but when i run off about 20-30 copies each quarter, it
would be easier to have it come out in order. is there any way i can get my
report to select a specific order? thanks.
 
G

Guest

Greg:

You'd have to include another column in the report's underlying RecordSource
to determine the order. You could do this by writing a function which
returns a number based on the department name, but you should already have a
Departments table if the logical model is to be strictly correct. If not
then create one. Add a column to this table, SortColumn for instance with 1
for Dept b, 2 for a, 3 for c etc. and in your report's RecordSource join the
Departments table to the existing table on the Department columns, e.g. to
take a simple example

SELECT FirstName, LastName, Position, Employees.Department, SortColumn
FROM Employees INNER JOIN Departments
ON Employees.Department = Departments.Department;

You can then group the report on SortColumn rather than Department

Ken Sheridan
Stafford, England
 

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

Similar Threads

Sort order in report 2
Sort order for a Report 3
Grouping in a Report 4
Grouping Problem in report 2
Report sorting function 2
Access Access Record Order 0
Specifying unusual sort order 5
Report order 7

Top