Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disappearing sorting & grouping in reports 1

Status
Not open for further replies.

THWatson

Technical User
Apr 25, 2000
2,601
CA
I have a database with about 700 names, addresses etc. entered. I want to print the pages so that every time the first letter of the last name changes I get a page break. (ie. all names from Adams through Axtmann on one page...then a page break...then all names from Badger through Buckman on the next page...then a page break...and so on.<br>My query sorts ascending by LastName field. My report has sorting and grouping properly set, and Order By LastName set, and Order On is turned on.<br>What happens is that anytime any information changes the sorting and grouping in the report is lost. A's still stay together but no longer in ascending alphabetical order, and the page breaks no longer occur. Until I go to report design, right click below the form, and enter &quot;LastName&quot; in the Order By again.<br>What makes the LastName disappear from the Order By box, and is there a way to prevent this from happening?<br>Tom Watson
 
I think you do not need &quot;Order By&quot; in either the report or the query. Just use the &quot;sorting and grouping&quot; function. Set &quot;Last name&quot; as the first group level, as group interval as 1, and set &quot;force new page&quot; after the group footer section.<br>
 
Seaport<br>Thanks. I had tried something like that before, but couldn't get the &quot;force new page&quot; to do what I wanted...but maybe I had something else set wrong. I applied your tip and it worked perfectly.<br>Tom Watson
 
Seaport<br>Looks as if I spoke too quickly.<br>Once I leave the database and re-enter, the sorting is gone. Grouping is fine. Page breaks are fine. All the A's are together, all the B's, etc...but not in proper alphabetical order.<br>Maybe I'm missing something here.<br>Tom
 
Sorting/Grouping has an option under &quot;Group on&quot;, each value or whole word. Maybe you need to enter one of each? Prefix (first letter) on first line and each value on second?
 
Elizabeth<br>The options under &quot;Group On&quot; in my sorting/grouping window are &quot;Prefix characters&quot; and &quot;Each value&quot;. I don't see the 'whole word' option that you mention.<br>I also don't see the second line you mention where I can set &quot;Each Value&quot; after I have set the first line to &quot;Prefix characters.&quot; Maybe I am misunderstanding.<br>Currently, I have the sorting/grouping option set to Prefix characters (first letter) and keep &quot;whole group&quot; together. This puts all the A's together, all the B's, etc. But it won't sort them in proper alphabetical order...unless I go to the Properties window and enter LastName in the &quot;Order By&quot; line. Then it works fine...until I close the database. Then this &quot;Order By&quot; setting disappears, and has to be rest every time you go to print out a report.<br>I was looking for some way to permanently set this so the person doing the report didn't have to go in and fix this setting every time.<br>Tom
 
Tom, you need 3 levels of sorting and grouping. 1st-last name (group on prefix character, as elizabeth recommended, keep whole group together,header- yes), 2nd-last name (group on each value, keep whole group together, don't think another header is necessary), 3rd-first name (group on each value).&nbsp;&nbsp;keep the force new page after section in your last name header.&nbsp;&nbsp;hope this works.&nbsp;&nbsp;i tried it on my database and it kept the grouping, alphabetizing, and page breaks after I closed and reopened the database.
 
aug4570 (Visitor)<br>Thanks. I'll try it.<br>Tom
 
aug4570 (Visitor)<br>I need help to understand what .nbsp  is and what it does.<br><br>Here's how I entered it...hope I did it correctly.<br>In the 3rd sorting and grouping level, I entered, exactly like this:<br>FirstNames.nbsp;nbsp; (I also entered the ampersand characters as you showed, but, for whatever reason, I can't make them and the .nbsp characters appear together here in this message. <br><br>In the &quot;Force New Page&quot; I entered:<br>After Section.nbsp;nbsp; (plus the ampersands) <br><br>Did I do the syntax correctly? What does .nbsp stand for? I can't find this in any manual anywhere.<br><br>It seems to work, but I would like to understand why. Also, when I ask for a report preview, or to print the report, a message box comes up that says &quot;Enter Parameter Value: FirstNames.nbsp;nbsp; (plus the ampersands) <br>It doesn't seem to matter what you enter - it has no effect that I can see.<br>Tom
 
Tom, I'm confused.&nbsp;&nbsp;Where did you pick up the &quot;.nbsp&quot; extension and ampersands?&nbsp;&nbsp;I don't see where I added them in my reply.&nbsp;&nbsp;Just remove only the extension and ampersands from anywhere you entered it and it should solve the annoying problem of the parameter message box prompting you. Did the 3 sorting/grouping levels give you the results you were looking for?&nbsp;&nbsp;&nbsp;&nbsp;
 
Hi, aug4570<br>Sorry for this confusion over the .nbsp and ampersands. Funny thing. They showed up plain as day in your message at home where I use Netscape. Here at my office I use Internet Explorer 5, and those characters don't show up here. Interesting. Maybe they're some kind of formatting commands that became embedded in the message. I don't know how to explain it.<br>But I'm glad for this clarification, because I thought they were some undocumented code that I had no idea what they were about.<br>Thanks for your help.<br>Tom<br>
 
aug4570<br>The mystery is solved!<br>What happened was that I e-mailed the thread to myself in order to print it out. And when the message came by e-mail it had those funny .nbsp and ampersand characters in it.<br>When I checked your response, they weren't actually in there, but somehow end up in there in the e-mail message. They must be formatting characters that somehow get translated!<br>Tom<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top