Results 1 to 2 of 2

Thread: report

  1. #1
    Join Date
    Mar 2004
    Posts
    139

    Unanswered: report

    I have a report that has detail that looks like this:
    DETAIL SECTION

    balance day
    250.00 1
    350.00 -4
    250 .00 1

    FOOTER SECTION
    =sum(balance)

    In this case the balance will be the total of all three. What I want to do is break out the balance into one where the days are positive:

    =sum(balance) where day > 0

    and negative

    =sum(balance) where day < 0

    Any ideas...
    Thanks,
    Bill

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    one option is to place some code behind the report

    decalre some variables eg
    SumPos
    SumNeg

    in the group header event
    set your variable to 0

    in the reports detail format event
    if val<0 then
    sumneg=sumneg+<columnfromdb>
    else
    sumnpos=sumpos+<columnfromdb>
    endif

    if the group footer
    define your controls to contain the +ve,-ve & balance

    if the group footer event
    assign the values to the controls eg
    tbSumNeg=sumneg
    tbSumPos=sumpos
    tbBal=Sumneg+SumPos

    you will find it quicker than using 3 domain functions...
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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