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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting and grouping help please?

Status
Not open for further replies.

larryww

Programmer
Mar 6, 2002
193
US
Do you guys use the "Sorting and Grouping" box for Access report design? I'm wondering how this runs up against what you put in the query design view. I'm hoping that I can avoid exhaustive testing if someone else (you!) is already strong on it.

Note that this isn't worrying with pure SQL; just the ACCESS interfaces for queries and reports.

Let me postulate an answer, and if anyone can augment or correct this, great. I'm not saying that this is correct, but it's my inclination currently:

1. Call the Report sorting and grouping box "S&G". S&G sorts (i.e., its right column) rank supreme. The first shown S&G line is done first (even if not visible). Note: every S&G item is _required_ to have asc. or desc. sort order.

2. Remaining S&G lines are processed, from top to bottom. Thus, a repeated one serves no purpose at all. (I'm starting to get quite bold here - please load your arrows, because I want the correct answer, more than to be right!).

3. *Within* each of those report groups, the query interface's explicit sorts are evaluated, left to right. I.e. the leftmost is done first, and the next one is secondary to it, etc.

4. Query Group Bys are evaluated after the sorts, each implying Ascending.

5. Whatever remains can not be guaranteed to consistently follow any order, even if the table source was sorted.

Orrrrr .... shall we get funky [afro2] and say 3. The query's sorts & groups are simply ignored and discarded by the report. (BION, this is my vote)

Your time and help is much appreciated.
 
Just as an aside, I use the QUERY to SORT records, and the REPORT's S&G guy to GROUP THEM the way I want, and rarely do I find that the two are at odds with each other.

I use S&G primarily for pagination control.

I do believe that a SORT specified in the report will override (i.e., re-sort) any query sorting. Kinda dumb, but I've seen it done.

Does this help?
Ex-JimAtTheFAA
78.5% of all statistics are made up on the spot.
Another free Access forum:
 
That's interesting perspective...but...

does anyone know the answer?
 
does anyone know the answer?

What was the question?

If this:

Do you guys use the "Sorting and Grouping" box for Access report design?

My answer is "Yes." I'm not sure what else you're looking for. ?



Ex-JimAtTheFAA
78.5% of all statistics are made up on the spot.
Another free Access forum:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top