Re: Group by year, then by total

Tech-Archive recommends: Fix windows errors by optimizing your registry



In report design view, use the Sorting And Grouping dialog to group by the company and then an expression that indicates if the date is in 2007 or not.

The first row of the dialog will contain the company name.
The second row will have an expression such as this:
=([OrderDate] >= #1/01/2007#)

You can create the group headers to give the desired appearance.
Choose Descending order on the expression to get the other years first.

If you want 2008 grouped in with the previous years (so only 2007 stands alone), use:
=([EnteredOn]>=#1/01/2007#) And ([EnteredOn]<#1/01/2008#)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"jhicsupt" <jhicsupt@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D644B8D3-8F06-4E12-B786-0AEEC9BC8D7E@xxxxxxxxxxxxxxxx
I want to have a report that shows the orders in the database that have an
order date <2007. I need the report to group by order date <2007, the
highest $ amount first. However I need the report to keep the customers
together. In other words, if ABC Company has total orders in 2006 for
$10,000 and then has other orders in 2007 for $4,000, then the report would
look like:

ABC Company
2006 [Total$]=$10,000
ABC 1 radio Order date 12/1/2006 $5,000
ABC 1 radio Order date 1/1/2006 $5,000

2007 [Total$]=$5,000
ABC 1 DVD Order date 1/1/2007 $5,000

2003 [Total$]=$2,000
ABC 1 ipod Order date 1/1/2003 $2,000

XYZ Company
2006 [Total$]=$8,000
XYZ 1 radio Order date 12/1/2006 $4,000
XYZ 1 DVD Order date 12/1/2006 $4,000

and so on

Hopefully I'm giving you enough information. Thanks so much in advance.





The field names are:

Customer
Order Year

.



Relevant Pages

  • Re: Problem: Repeat as header row - automated
    ... a report in Word, which consists of many individual tables of various ... only the first row of a report, which consists only of the column header ... At the top of next page, a repeated column header row appears, as ... repeat table row 1 ...
    (microsoft.public.word.tables)
  • Re: Hiding Report
    ... I think this is a better suggestion. ... this piece of code is lifting the first value from combo box off ... and applying the case statement to all rows on the report ... according to the value in the first row. ...
    (microsoft.public.access.forms)
  • Re: Still having a prob counting the blocks of 1s
    ... Part of the problem you're having is that your formula references the first row in the previous column and, if the formula in that cell returns a '1', its value gets added to the total for the next column. ... If I put the formula across the sheet, approx 82 people then enter a few 1's most of the report will be 1's in all cells. ...
    (microsoft.public.excel)
  • Re: lookup problems
    ... The web page seems to be offline, but I've found mirrors using Google. ... For each occurrence, report the value in that column, first row (e.g. ...
    (microsoft.public.excel)
  • Re: How to make newest item show up first in CListCtrl
    ... My Report View contains large number of items, ... Ali R. Wrote: ... it shows up as the first row. ... >> It likes most email clients, ...
    (microsoft.public.vc.mfc)