Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    report grouping (Access 2000)

    <img src=/S/help.gif border=0 alt=help width=23 height=15>
    I have created a group footer in my report and it is to sum the details. The group is based on a field called ItemType. Let's say I have 5 Item types, namely 1,2,3,4,5. While I have no trouble in getting the sum for each type, I would like to know if I can also have the sum just for types 1 and 2 together as well in the report footer.

    Thanks

  2. #2
    Star Lounger
    Join Date
    Oct 2001
    Location
    Western Massachusetts, USA
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: report grouping (Access 2000)

    The easiest way to do this is in the underlying query. Create a new column with the following expression:
    Types1And2:IIf([ItemType]=1 Or [ItemType]=2,[FieldNameYouNeedToSum],0)
    This will return a value for Types 1 and 2 and a 0 for 3,4 and 5.
    Then in the Report, add the field "Type1And2" to the detail section, set it's visible property to No and in the group footer, use =Sum(Type1And2) as the Control Source for your textbox. That will return the Totals for Type 1 and 2. You can do the same thing for any combination of Types, but doing it directly in the Report isn't possible.
    Paul

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: report grouping (Access 2000)

    Try =Sum(Type1) + Sum(Type2). You can't based a calculated control on another calculated control in a report, but you can repeat the original formulas to combine two control values.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •