• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2292
  • Last Modified:

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

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?


  • 2
2 Solutions
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;

doitforstudentsAuthor Commented:
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).
You  can display the records in the group header rather than in the details section.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now