Alpha DevCon 2018
Results 1 to 9 of 9

Thread: Batting Average Report

  1. #1
    Member
    Real Name
    Bill Abraham
    Join Date
    Sep 2006
    Posts
    48

    Default Batting Average Report

    I create my databases on A4V7 and report them on A5V7.
    I want to report the batting averages for each player on my girls' softball
    team and the position(s) she plays.

    The only sections in my report are a Report Header and Detail section.
    The Detail section includes the player's Name, the Positions she plays and
    her Batting Average.

    Hits and AtBats are numeric fields recorded in A4. The Batting Average is calculated in
    the A5 report as Hits/AtBats

    I set the Order of the report to Batting Average in Descending Order (highest
    batting average to the lowest).

    The Filter is is a flag in each player record that shows she is a member of this year's team.

    The report I get (attached) is not exactly what I hoped for. The records do not appear
    in descending order ot Batting Average, as players with zero batting averages are
    sandwiched in between players with positive batting averages.

    I had hoped that those with positive numbers would be reported first, in descending
    order, and those with zero batting averages coming last in the report.

    I have tried to create a Group in the report based on the calculated field Batting
    Average. But A5 says it doesn’t recognize that field.

    I hope this is a simple and obvious fix that just got by me. I will appreciate
    any help here.
    Attached Files Attached Files

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,948

    Default Re: Batting Average Report

    Try creating a group on one of the player identifier fields (lastname if it's unique, id, etc). In the group properties, Group Order, choose Specify Order and use the batting average calculation.
    There can be only one.

  3. #3
    Member
    Real Name
    Bill Abraham
    Join Date
    Sep 2006
    Posts
    48

    Default Re: Batting Average Report

    Thank you for the suggestion, Stan. I will try that and let everybody know how it works.

  4. #4
    Member
    Real Name
    Bill Abraham
    Join Date
    Sep 2006
    Posts
    48

    Default Re: Batting Average Report

    Stan, I tried that. A5 again returns the message "Field is not recognized."
    I thought about trying to index the field. It won't let me.Error Message.jpg

  5. #5
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,948

    Default Re: Batting Average Report

    Please reread my post and note the underlined word. Also note the suggestion for the grouping field. Commit = "Y" would seem to be the report filter.
    There can be only one.

  6. #6
    Member
    Real Name
    Bill Abraham
    Join Date
    Sep 2006
    Posts
    48

    Default Re: Batting Average Report

    If this is what you mean, "Specify Order and use the batting average calculation," that's what I did do, as you should be able to see from the jpeg attachment.
    I also used Commit="Y", as you also can see. It still returned the error message. But I tried something else.

    Instead of using the Batting Average calculation from the A5 report, I used the field calculated in A4 database. Then I ran the A5 report and it does
    what I want it to do, more or less. A couple of fields are blank and I will work on that. But, at least the report shows the averages in descending order, all together, with the 0.000 averages grouped together at the last of the report.
    Attached Images Attached Images

  7. #7
    Member
    Real Name
    Bill Abraham
    Join Date
    Sep 2006
    Posts
    48

    Default Re: Batting Average Report

    I didn't think you use a field that was calculated in A4 on an A5 report.
    I tried that one other time and something got messed up.

  8. #8
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,948

    Default Re: Batting Average Report

    You should be able to format the batting average on the report in its properties to be

    123456.78 (blank if zero)

    to take care of some showing 0.000
    There can be only one.

  9. #9
    Member
    Real Name
    Bill Abraham
    Join Date
    Sep 2006
    Posts
    48

    Default Re: Batting Average Report

    Gotcha. Thank you very much, Stan

Similar Threads

  1. Average Calculation
    By bestview in forum Application Server Version 11 - Web/Browser Applications
    Replies: 0
    Last Post: 04-24-2013, 02:01 PM
  2. Using Average() on form
    By trackmanpete in forum Alpha Five Version 8
    Replies: 7
    Last Post: 05-05-2007, 06:01 PM
  3. Monthly average
    By edward.mattison@scbhn.org in forum Alpha Five Version 6
    Replies: 7
    Last Post: 08-19-2005, 11:52 AM
  4. Average problem in report
    By edward.mattison@scbhn.org in forum Alpha Five Version 5
    Replies: 2
    Last Post: 03-03-2004, 06:17 PM
  5. Average
    By edward.mattison@scbhn.org in forum Alpha Five Version 5
    Replies: 12
    Last Post: 12-10-2002, 10:56 PM

Bookmarks

Posting Permissions

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