Print Page | Close Window

eliminating results

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21026
Printed Date: 29 Apr 2024 at 12:14am


Topic: eliminating results
Posted By: smccomish
Subject: eliminating results
Date Posted: 10 Sep 2014 at 5:34am
I need some help writing a formula.

I am pulling data that matches:

{FSSetup.Description} like ["Policy Complete*", "Policy typed*", "Sirva Insuring*"]

These fields can be marked "NA" which equals 1

{FSLog.NotApplicable} = 0

I am trying to create a formula that says

IF "Policy complete*" or "Policy typed*" = 1
AND
"Sirva Insuring*" = 0
Then don't show.


Does this make sense?

Also, i believe i will need to convert the number of 0 & 1 to a string.

THanks for the help!!!!

-------------
Thanks for your help!!



Replies:
Posted By: DBlank
Date Posted: 10 Sep 2014 at 9:41am
Is this happening at group level (reviewing multiple rows for data) or is all evaluation happening in a single row?


Posted By: smccomish
Date Posted: 10 Sep 2014 at 10:07am
Sorry, i am not sure what that means. Here is an example of a file that shows up twice on my report.

File No.   Comp.By     Comp.Date N/A? Description
3098Rsec   Jeremy K    4/15/14     1   Policy complete
3098Rsec   Jaclyn D    4/15/14     0   Sirva Insuring


-------------
Thanks for your help!!


Posted By: DBlank
Date Posted: 10 Sep 2014 at 12:00pm
I think I understand basically what yuo want to do. YOu need to get rid of both rows based on the criteria across multipel rows.
Youc an do this in a stored proc before getting the data into the report or you can handle this in group select criteria.
basically you need to create a group on the primary field for the records (file No field), create "flag" formulas that allow you to determine based on the summary of the flags which groups to keep and which to discard.
example:
//flag1
IF description in ("Policy complete*","Policy typed*") and N/A= 1 then 1
//flag2
If description = "Sirva Insuring*"  and N/A=0  then 1
 
now sum flag 1 and flag 2 at your group footer.
If both sums are > 0 then this is a group to discard so use that logi in the group select criteria
NOT(SUM(flag1,fileno)>0 and sum(flag2,fileno)>0)
 
 
//flag



Print Page | Close Window