Alpha Video Training
Results 1 to 8 of 8

Thread: IF and Total

  1. #1
    Kathy Johnson
    Guest

    Default IF and Total

    Hello, I am trying to total 3 numeric fields in a report if the starting date is later than 6/29/04. The 3 fields are named agreement, add-on and renewal. Each of these fields has a corresponding beginning date field. I only want the agreement, add-on or renewal field to be included in the total if the corresponding beginning date is greater than 06/29/2004. For example if the record has an agreement begin date of 08/01/2003 and an agreement field of $10,000 and a renewal begin date of 07/31/2004 and renewal field of $15,000, I only want the $15,000 to be included in the total. I have tried many different expressions and always have an invalid espression error. Any advice would be greatly appreciated.

    Thank you,

    Kathy Johnson

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

    Default RE: IF and Total

    if(agreement_begindate"{6/29/04},agreement,0)+ if(add-on_begindate"{6/29/04},add-on,0)+ if(renewal_begindate"{6/29/04},renewal,0)

    substitute your actual field names

  3. #3
    Kathy Johnson
    Guest

    Default RE: IF and Total

    Thanks for the reply. Total is blank. Any advice.

    Kathy

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

    Default RE: IF and Total

    Are you sure there are records with dates after 6/29/04?

    Can you aip up the table and support files and attach them here?

  5. #5
    Kathy Johnson
    Guest

    Default RE: IF and Total

    I just realized that these fields are in a rich text box. Does this make a difference?

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

    Default RE: IF and Total

    Actually you should create a calculated field for the report with the calculation as described, then put that calculated field in the rich text box.

  7. #7
    Kathy Johnson
    Guest

    Default RE: IF and Total

    I got if figured out. I neglected to change the calc to total.

  8. #8
    Member
    Real Name
    Edward Schulz
    Join Date
    Jul 2000
    Posts
    742

    Default RE: IF and Total

    Hi Kathy,

    A general rule is to not use a hyphen in a field,table, record name, etc. For instance your field name add-on might be more stable if it was add_on.

    efs

Similar Threads

  1. How To Get Total
    By Phil Rolf in forum Web Application Server v6
    Replies: 1
    Last Post: 06-23-2005, 04:14 AM
  2. Total
    By Bill@TrackerSystems.com in forum Alpha Five Version 6
    Replies: 12
    Last Post: 11-23-2004, 02:19 PM
  3. Total fails to total on the form
    By Chris A in forum Alpha Five Version 5
    Replies: 1
    Last Post: 07-28-2004, 01:07 PM
  4. run total
    By Birol Gezici in forum Announcements
    Replies: 0
    Last Post: 08-10-2001, 08:40 AM
  5. How To Total an Invoice?
    By Bob Elliott in forum Alpha Five Version 4
    Replies: 2
    Last Post: 02-23-2001, 06:19 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
  •