Sort/Group on more than one field with page break (1 Viewer)

trstorer

Registered User.
Local time
Today, 05:09
Joined
May 23, 2000
Messages
30
I have a report - based on a query - that needs to be sorted, first by Department; then by Inspector; then case name in alphabetical order.

I can get the first sort to work OK as well as the second sort on the Inspector. But, I also need a new page break after each Inspector. I have tried a variety of options within the Sorting/Grouping on the report and on the Header properties to no avail. Any ideas?

Do I need to tie the first two fields - Dept. and Inspector - together somehow?

I appeciate any input. Thanks.
 

trstorer

Registered User.
Local time
Today, 05:09
Joined
May 23, 2000
Messages
30
Thank you, Rich. Just when I thought I had tried everything - even that one! Sometimes the second time is a charm - and probably on the right control helps too. I appreciate your help.
 

rick roberts

Registered User.
Local time
Today, 05:09
Joined
Jan 22, 2003
Messages
160
where would i find this force new page property excactly and how do i tie it in with each letter of the alphabet ie creating a single page full of names starting with the same letter as if i were creating a loose leaf telephone directory
 

boblarson

Smeghead
Local time
, 21:09
Joined
Jan 12, 2001
Messages
32,059
where would i find this force new page property excactly
In design view of the report you click on the GROUP header and then select the FORCE NEW PAGE property in the property dialog on the FORMAT tab of the property dialog.

and how do i tie it in with each letter of the alphabet ie creating a single page full of names starting with the same letter as if i were creating a loose leaf telephone directory
You can set a group on the last name and then go into the SORTING AND GROUPING and select GROUP ON (and change to INTERVAL) and make sure that the GROUP INTERVAL is set to 1.
 

rick roberts

Registered User.
Local time
Today, 05:09
Joined
Jan 22, 2003
Messages
160
i think ive done as you said -- set the FORCE NEW PAGE to BEFORE SECTION and GROUP ON LastName with BY FIRST CHARACTER and KEEP WHOLE GROUP TOGETHER and a lot of other combinations to that effect but i seem to either get each single record per page or just the first record of each initial letter per page
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 05:09
Joined
Sep 12, 2006
Messages
15,729
well you will

if you group by first letter, you are saying put all the "A" s together, then all the "B" s together etc, as groups, and if your footer is saying do a new group after each group, then you will get each letter on a separate page ...

the report will ignore the query - but
put sort paramters on the query, to get the query itself sorted in the order you want, and then replicate this order in the report. Paging is a different thing, that can be added later.
 

rick roberts

Registered User.
Local time
Today, 05:09
Joined
Jan 22, 2003
Messages
160
i wasnt using a query -- merely printing the whole lot -- i have found out my mistake by looking at Northwind -- ive moved the GROUP ON to be above the SORT BY and this seems to have cured the problem -- thanks for your help
 

czejny

New member
Local time
Today, 06:09
Joined
Mar 13, 2009
Messages
6
if i get it right you sort by last name THEN group by its first letter?
try the other way around: group by first letter of last name and then sort ;)
 

rick roberts

Registered User.
Local time
Today, 05:09
Joined
Jan 22, 2003
Messages
160
yes youre right - -thats what i was doing - and reversing it as you suggested is the answer - -thank again
 

Users who are viewing this thread

Top Bottom