reports- sorting and grouping

T

thriveni

i used access 2000.
i have a report that has been created using the report
wizard. i use fields(for eg.) fld1 and fld2 for grouping
the report. however i do not want any sorting to be done
in fld1 and fld2. hoever access seems to automatically
sort on the group fields. is there anyway i avoid the
sorting ?
thanks in advance.
 
S

Steve Schapel

Thriveni,

I think the only way is to use the Sorting and Grouping dialog to
define the sorting you *do* want for your data, in advance of the fld1
and fld2 grouping.

If this doesn't make sense, maybe it would be good if you could post
back with some more details of your data, maybe with some examples,
and explain what you want to achieve.

- Steve Schapel, Microsoft Access MVP
 
M

Marshall Barton

thriveni said:
i used access 2000.
i have a report that has been created using the report
wizard. i use fields(for eg.) fld1 and fld2 for grouping
the report. however i do not want any sorting to be done
in fld1 and fld2. hoever access seems to automatically
sort on the group fields. is there anyway i avoid the
sorting ?


Sorry, but that doesn't make sense. If the records are
grouped on the values in fld1, then the records with the
same fld1 values must be together (i.e. sorted).

Maybe the problem is that you want to sort the records
**within** the group in some specific order??
 
T

thriveni

i think i need to clarify myself.
i assume that by 'grouping', access puts all the records
with fld2 together in the order they are in the database.
but i do not want them sorted because the order in the
database is not sorted. they are classified according to
waht they represent.
for eg:
fld1 fld2
---- -----
AA 69
BA 35
AA 44
CE 15
AA 25
AA 50

after the grouping in the report i want it to display as

AA 69
AA 44
AA 25
AA 30
BA......

is that possible at all ?
 
M

Marshall Barton

thriveni said:
i think i need to clarify myself.
i assume that by 'grouping', access puts all the records
with fld2 together in the order they are in the database.
but i do not want them sorted because the order in the
database is not sorted. they are classified according to
waht they represent.
for eg:
fld1 fld2
---- -----
AA 69
BA 35
AA 44
CE 15
AA 25
AA 50

after the grouping in the report i want it to display as

AA 69
AA 44
AA 25
AA 30
BA......


I don't see any grouping there, just sorting by fld1, but
that's probably irrelevant.

I think what you're asking is how to sort fld2 to keep it in
some order that you say are their order in the table. The
confusion here is your misperception that records in a table
have some kind of order, they don't! The records must have
one or more fields that can be used to order the records.
This might be a field with the date/time that the records
were first entered, some numbering scheme or whatever.

If you view the table in sheet view, you might think the
records are always presented in the order you see in the
data sheet. This is also untrue! The sheet view is really
just the display of a query that Access makes up so you can
view the records and the default order for this presentation
query is usually (but not always) the primary key.

Another common assumption is that you can use an autonumber
primary key to sort records in the order that they were
entered. While this may appear to work, it is not reliable
because an autonumber primary key is only guaranteed to be
unique and might become random and/or negative.
 

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