Alpha Video Training
Results 1 to 5 of 5

Thread: averaging based on conditional object

  1. #1
    Ralph Marple
    Guest

    Default averaging based on conditional object

    I have a report that prints a numerical field in "red" if a conditon from a check box is true or "black" if the condition is false. At the end of the report are summary fields for average, lowest and highest. How can I make these summaries only consider when the field is "black"?

  2. #2
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default RE: averaging based on conditional object

    Ralph,

    Do you want the sumamry fields to print only if a field in the report detail section is "black"?

    kenn

  3. #3
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: averaging based on conditional object

    Design calculated fields for the report

    tot = if(logicalfield=.F.,numericfield,0) and
    count = if(logicalfield=.F.,1,0)

    then you can either drag these fields into the summary area, or define your own

    total value of falses = total(tot,GRP->GRAND)
    max value of falses = maximum(tot,GRP->GRAND)
    avg value of falses= total(tot,GRP->GRAND)/Count


    but that won't get you to the minimum value.

    You may have to create a group in the report, based on the change in the logical field, then do your summaries in the group footer, then copy or drag these summary fields to the report footer.

  4. #4
    Ralph Marple
    Guest

    Default RE: averaging based on conditional object

    Thank you for answering. Yes, the summary field would still print and would be 0.

  5. #5
    Ralph Marple
    Guest

    Default RE: averaging based on conditional object

    Thanks for the help. It worked fine.

Similar Threads

  1. Tabbed Object vs. Conditional Object
    By Tom Cone Jr in forum Alpha Five Version 6
    Replies: 26
    Last Post: 02-28-2005, 10:23 AM
  2. Conditional object on report
    By Howard G. Cornett in forum Alpha Five Version 5
    Replies: 1
    Last Post: 10-07-2003, 03:18 PM
  3. Conditional Object ?
    By BRIAN GRAY in forum Alpha Five Version 5
    Replies: 6
    Last Post: 05-08-2003, 04:16 PM
  4. Conditional object
    By Jane Fortier in forum Alpha Five Version 4
    Replies: 1
    Last Post: 05-31-2001, 09:37 AM
  5. Conditional Object
    By Arthur Casse in forum Alpha Five Version 4
    Replies: 17
    Last Post: 09-25-2000, 11:09 AM

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
  •