A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Grouping/Sorting by Date



 
 
Thread Tools Display Modes
  #1  
Old December 10th, 2008, 05:26 PM posted to microsoft.public.access.reports
Question Boy[_2_]
external usenet poster
 
Posts: 179
Default Grouping/Sorting by Date

I have a report which is a collection of dates. I want them grouped and
ordered by date so I setup the grouping and sort order accordingly. However,
it is not working?! It is not respecting the Ascending sort order on the
date field. Would anyone know a reason why this might happen and the
solution.

QB

  #2  
Old December 10th, 2008, 05:39 PM posted to microsoft.public.access.reports
fredg
external usenet poster
 
Posts: 4,386
Default Grouping/Sorting by Date

On Wed, 10 Dec 2008 09:26:01 -0800, Question Boy wrote:

I have a report which is a collection of dates. I want them grouped and
ordered by date so I setup the grouping and sort order accordingly. However,
it is not working?! It is not respecting the Ascending sort order on the
date field. Would anyone know a reason why this might happen and the
solution.

QB


You haven't given enough good information (such as how is the actual
sort displaying), so my first guess would be that the dates are not
really date datatype values but more likely text values.
Also, you don't mention where you grouped and sorted the data.? The
only place to reliably sort data in a report is via the report's
sorting and grouping dialog, not in a query.... in Report Design View
click on View + Sorting and Grouping.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old December 10th, 2008, 05:41 PM posted to microsoft.public.access.reports
Question Boy[_2_]
external usenet poster
 
Posts: 179
Default Grouping/Sorting by Date

I found a solution, don't know what the underlying promblem is, but should
this be able to help anyone else...

I create 3 fields in my underlying report query
eYear: Year([eDate])
eMonth: Month([eDate])
eDay: Day([eDate])

and then I changed my report grouping and sorting to use these 3 fields.

Seems to work.

"Question Boy" wrote:

I have a report which is a collection of dates. I want them grouped and
ordered by date so I setup the grouping and sort order accordingly. However,
it is not working?! It is not respecting the Ascending sort order on the
date field. Would anyone know a reason why this might happen and the
solution.

QB

  #4  
Old December 10th, 2008, 06:08 PM posted to microsoft.public.access.reports
Question Boy[_2_]
external usenet poster
 
Posts: 179
Default Grouping/Sorting by Date

Fredg

I checked, each date field is set to Date/Time type and I did indeed use the
report's sorting and grouping dialog to set the group and sort order. That
is why I don't understand why it is not working by default.

Actually, now that you make me think of it, the dates are a product of a
DMax function. Could this be the issue?

Still perplexed!!! (but at least I have a workaround for right now)

QB


"fredg" wrote:

On Wed, 10 Dec 2008 09:26:01 -0800, Question Boy wrote:

I have a report which is a collection of dates. I want them grouped and
ordered by date so I setup the grouping and sort order accordingly. However,
it is not working?! It is not respecting the Ascending sort order on the
date field. Would anyone know a reason why this might happen and the
solution.

QB


You haven't given enough good information (such as how is the actual
sort displaying), so my first guess would be that the dates are not
really date datatype values but more likely text values.
Also, you don't mention where you grouped and sorted the data.? The
only place to reliably sort data in a report is via the report's
sorting and grouping dialog, not in a query.... in Report Design View
click on View + Sorting and Grouping.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

  #5  
Old December 10th, 2008, 06:38 PM posted to microsoft.public.access.reports
Dale Fye
external usenet poster
 
Posts: 2,651
Default Grouping/Sorting by Date

Is there a chance that the DMAX( ) could be returning a NULL value?

Have you tried forcing it back into a date, using the cDate( ) conversion
function?

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.



"Question Boy" wrote:

Fredg

I checked, each date field is set to Date/Time type and I did indeed use the
report's sorting and grouping dialog to set the group and sort order. That
is why I don't understand why it is not working by default.

Actually, now that you make me think of it, the dates are a product of a
DMax function. Could this be the issue?

Still perplexed!!! (but at least I have a workaround for right now)

QB


"fredg" wrote:

On Wed, 10 Dec 2008 09:26:01 -0800, Question Boy wrote:

I have a report which is a collection of dates. I want them grouped and
ordered by date so I setup the grouping and sort order accordingly. However,
it is not working?! It is not respecting the Ascending sort order on the
date field. Would anyone know a reason why this might happen and the
solution.

QB


You haven't given enough good information (such as how is the actual
sort displaying), so my first guess would be that the dates are not
really date datatype values but more likely text values.
Also, you don't mention where you grouped and sorted the data.? The
only place to reliably sort data in a report is via the report's
sorting and grouping dialog, not in a query.... in Report Design View
click on View + Sorting and Grouping.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:27 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.