We help IT Professionals succeed at work.

Report Grouping

Hello,

I have a report grouped first by [Date] then by [CoName].
The report groups on date as I want but I need to include all other [CoName] with older dates BUT ONLY within that month.
Currently, those [CoName] records are bumped further down in the same month because of the sort I have.

example:
Co A with all dates in January need to be grouped together in January and sort needs to be by Date oldest to newest.  

I hope that makes sense.  If not please let me know.

I have attached a pared down db and there is only 1 rpt and 1 tbl
thank you
EE.accdb
Comment
Watch Question

So are really grouping by month? I'm not sure I fully understand yet.
See if this works for you:
EE_1.accdb
pdvsaProject finance

Author

Commented:

Hi, i am grouping by month and the report does show this grouping as first level.  I need the sort okdest to newest as it is now. The problem is that it wont group on CoName as the tecord is an older date.  Let me know if that helps. 

pdvsaProject finance

Author

Commented:

Ok I see you uploaded a db.  On phone now.  Will be at computer soon.  Thank you 

pdvsaProject finance

Author

Commented:

Hi Anders,


I have looked at the db and its pretty close but I need the first grouping on CoName to be the oldest date but currently is shows CoB as the first grouping and has Jan 29 and Jan 30.  So the first record in the rpt should be Jan 24 as its the oldest and then the next grouping would be on P-2 because the coname has the second oldest of Jan 27.  I tried to simply add a sort order on [Date] but it messes it up.  


Let me know if you follow me.  

pdvsaProject finance

Author

Commented:

I noticed that if I put a sort on the [Date] in the query it looks correct when I run the query but the report doesnt display it the same for some reason.  

pdvsaProject finance

Author

Commented:

wait..i think I have it now.  I put the sort rt below the MonthID on the report and it looks ok now.  thank you.  I think I am good nnow with your solution.  It works.  thank you much

Glad you were able to work it out :)
pdvsaProject finance

Author

Commented:

Anders,


Well I added more data and it doesnt seem to group like I thought.  I have not used EE in awhile.  Since the question is closed, I assume I will have to ask a moderator to re-open.  Kindly let me know best steps.  Thank you...sorry. 

pdvsaProject finance

Author

Commented:

or do I just ask another question? I dont mind doing this.  

I *THINK* this might be what your after, but you should test it with some more data. I am also concerned that if you have alot of data, that performance will not be all that good.

Should that be the case, you can consider if you can make the Month_ID a calculated field in your table, such that it is stored/cached.
EE_2.accdb
pdvsaProject finance

Author

Commented:

Anders, i am viewing from my phone and i am not sure if there is something attached? It doesn't appear there is an attachment.

Yea...lets blame that one on the interface connecting the chair to the keyboard....

I have edited the post and added the attachment.
pdvsaProject finance

Author

Commented:

Ahhh.  Good news...it looks great!  Thank you for the follow up on that one.  Much appreciated.