Crystal:  Sum Unsuppressed Records and Using a Correct Conditional Suppression Formula

Posted on 2007-10-05
Last Modified: 2010-05-18
I am writing a grade report using Crystal Reports XI to pull out information from a grade cards entered in for dental procedures done by students.  However, grades can be given part of the way through the procedure.  Now this software we are using does not allow us to edit the previous grade card unless it is entered by the exact same faculty member so there are many duplicate grades.  So  here is what I am trying to do....

I am trying to Pull out all grades given to a student for a procedure without any duplicates.  I have minimized the duplicates to some extent by using a conditional suppression formula however it sometimes deletes a grade line with a single unique grade, I will be taking the earlier submitted grade (code for the suppression formula):

if Count ({GRADITEM.QuestionText}, {GRADITEM.QuestionText}) >= 2 and {TRX.TreatmentDate} > Next({TRX.TreatmentDate}) or Count ({GRADITEM.QuestionText}, {GRADITEM.QuestionText}) >= 2 and {TRX.TreatmentDate} > Previous({TRX.TreatmentDate}) then

First off how can this be fixed?

 Next... I am trying to total the grades for the lines but my count is still including the suppressed records.  I don't want this to happen.  How can you only sum unsuppressed records (I have never had this problem before), is it something to do with my conditional suppression formula?


Question by:doitforstudents
    LVL 100

    Accepted Solution

    One way to do this in the report is to group on the QuestionTex field then sort by the date field descending

    YOu can do you count in the group header through a formula

    In the report header add a formula
    Name - DeclVars
    Global NumberVar QuestionCount:= 0;

    In the group header
    Name - CountQuestions
    Global NumberVar QuestionCount;
    QuestionCount:= QuestionCount+ 1;

    In the group footer
    Name - DispQuestionCount
    Global NumberVar QuestionCount;
    Local NumberVar Q_Count;
    Q_Count := QuestionCount;
    QuestionCount := 0;


    Author Comment

    Now that does solve my count issue, however I am still experiencing issues with my formula suppressing items that don't need to be suppressed (where there isn't a duplicate question).
    LVL 100

    Assisted Solution

    You  can display the records in the group header rather than in the details section.


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    How to increase the row limit in Jasper Server.
    This article will show, step by step, how to integrate R code into a R Sweave document
    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 …
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    734 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

    23 Experts available now in Live!

    Get 1:1 Help Now