Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1

    Unanswered: Cleaner way to order report with grouping levels?

    I have a report that I need to dynamically order according to user input. Normally this can be done using an order by clause. However, since I have defined grouping levels in the report, the order by clause is over-ridden.

    To get around this, I have created another grouping level that I set dynamically from code similar to this in the On Open event for the report:

    If something = "Something" Then
    Me.GroupLevel(0).ControlSource = "fldSomething"
    End IF

    Unfortunately, I'm now in a situation where I need to add another grouping level. I CAN do this using the same method, but it seems awfully messy.

    So, is there a better way to dynamically order a report that has grouping levels?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    *Bump*

    Anyone?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    I personally don't see that as messy - it's taking full advantage of the flexibility of Object based programming.

    Grouping is in effect Sorting. If you took the days of a standard calendar and sorted by day, you would get 12 "1's", then 12 "2's" etc. If you group by Month, you get the correct sequence because grouping first sorts by Month then by Day.

Posting Permissions

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