Results 1 to 3 of 3

Thread: Please Help Me

  1. #1
    Join Date
    May 2004
    Posts
    4

    Unanswered: Please Help Me

    Hello... Friends

    I'am new to perl. Actualy i'am developing a report in that I have 4 fields in my production table. Code, Description, Date, Qty. My requirment is after displaying records it should caluculate total on qty.
    -------------------------------------
    Code | Description | Date | Qty |
    -------------------------------------
    101 ABC 10-Jan-04 10
    102 XYZ 21-Jan-04 20
    103 ASD 11-Jan-04 30
    =============================
    Total Qty 60 **how to get this value.
    =============================

    Up to diplaying records is ok. But i don't know to how to caluculate total.

    Please Help me.

    Regards & Thx
    Safa

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Inside the while loop that prints the detail lines accumulate the total (check out the += operator). When the loop "comes up dry" and there are no more rows, then print the total.

    -PatP

  3. #3
    Join Date
    May 2004
    Posts
    4
    Quote Originally Posted by Pat Phelan
    Inside the while loop that prints the detail lines accumulate the total (check out the += operator). When the loop "comes up dry" and there are no more rows, then print the total.

    -PatP
    Hi...

    Here i'am using For Loop. please will explain by a example..

    Regards & Thx
    Safa

Posting Permissions

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