crystal reports

Posted on 2004-11-17
Last Modified: 2012-05-05
I am trying to get the avg grade in a winform using and crystal reports.  Below is the code that I have tried that does not work.  How do I find the avg of 3 rows in a crystal report?

{student.grade1} + {student.grade2} + {student.grade3} / 3
this code does not avg the grade

Average ({student.grade1} + {student.grade2} + {student.grade3} / 3)
this one is asking for a required field at the end

Question by:freebird317
    LVL 21

    Accepted Solution

    To compute an average, you need to to the addition first.  Use this expression:
      ({student.grade1} + {student.grade2} + {student.grade3}) / 3

    Without the parentheses around the addition, the division is performed 1st and then the other two student grades are added.
    LVL 100

    Expert Comment

    Are the grades in the same record?

    if not then
    Add a group on the student
    Use a summary function - Average and the grade field as the data.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Suggested Solutions

    Title # Comments Views Activity
    mirrorEnds challenge 6 63
    post4 challenge 28 68
    Fibonacci challenge 11 61
    parentbit challenge 3 36
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now