Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224

    Unanswered: finding max n avg

    I generate a list of values and I need to display the avg and max in my report
    =Max([myvalue]) in a text box displays #Error in the report

    any one know why

  2. #2
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224
    I have attached the file
    go to reports , click on Flow Meter Readings Report
    enter the dates 4/14/2004 and 4/15/2004
    i am trying to find the avg and max of the outfall readings

    thanks
    Attached Files Attached Files

  3. #3
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I haven't downloaded it, but to save some time...

    Have you made sure that the physical control name is not the same as the underlying dataset?

    eg, you will get an error if your field name is MyField, and the field you're aggregating is also called MyField. The exact same formula will work if you rename the control to txtMyField

  4. #4
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224
    in the report they are called text34 and text 36 and in the table they are called outfall , i think i m setting the control source wrong
    so far i have tried =Max([main table name]!field name)
    =Avg([field name])
    =Avg([Query name]!field name)

    Thanks

  5. #5
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Move your averages into the report header.

  6. #6
    Join Date
    Apr 2004
    Location
    ny, ny
    Posts
    224
    moving avgs to report header works
    how do i display the date associated with the max value

  7. #7
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    At that point you may as well make it a subreport, as you would like to pull a good deal of information from one record. It would be much easier to imbed a subreport with that one record and be done with it.

Posting Permissions

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