Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Error:Boolean Required Post Reply Post New Topic
Author Message
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Topic: Error:Boolean Required
     Posted: 28 Sep 2009 at 11:04am
Hello Folks,
                    I am trying to create a new formula which include 2 conditions inside in it.
i.e
 
First condition is it shoudnt have the negatives and 
 
Second Condition is trying to get rid of values of the field called gross_rec_nc, so subtracted this field
 but eventually am getting this Boolean Error.
 Am providing the Error formula below. Should i need to create 2 separate formulas or is there any other way that i can validate the condition mentioned above.Can anyone please throw some light on this.
 
 
 if {rep41_tbl_detail.gross_recovery} < 0 then 0 else {rep41_tbl_detail.gross_recovery} and({rep41_tbl_detail.gross_recovery} = {rep41_tbl_detail.gross_recovery} - {rep41_tbl_detail.gross_rec_nc})
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Sep 2009 at 11:45am
NOt sure what youa re trying to do exactly...
if {rep41_tbl_detail.gross_recovery} < 0 then 0 else ({rep41_tbl_detail.gross_recovery} - {rep41_tbl_detail.gross_rec_nc})
This will give you the a 0 if recovery is a negative value or the value of recovery-rec_nc if recovery is not negative.
Is that whaty you want it to do?
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 28 Sep 2009 at 11:55am

well i want the formula where it excludes the negative values as well as noncash values which is {rep41_tbl_detail.gross_rec_nc}) from the field {rep41_tbl_detail.gross_recovery}.

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Sep 2009 at 12:09pm

given that description I do not think this is the correct formula for you.

It sounds like youa re trying to do a SUM on multiple fields on one row.
You may want to repost your entire process. I think we can assist you with it but we need to know exactly what you are trying to accomplish. 


Edited by DBlank - 28 Sep 2009 at 12:09pm
IP IP Logged
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Posted: 28 Sep 2009 at 2:54pm
well thanks for getting back. Basically i have a column "Gross Recovery"  which comes in from a table populated by a Stored procedure. Gross Recovery populates values of Cash,Non cash and Refunds( i.e negative amount) every month per specific client.
  Previously the Reports have the Gross recovery Column populating Cash,noncash and Refunds. Now the requirement is not to include Noncash and Refunds in the Gross Recovery column for a report.
 
Ideally i thought of creating a new formula which has only Cash values and including the formula which i have mentioned above but somehow i was unable to find the logic. I wud appreciate if you can help me out of thisCry
 
 
 
Thanks,


Edited by Nav522 - 28 Sep 2009 at 3:16pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 Sep 2009 at 3:24pm
I am stil not sure how you have your report set up because it sounds like you have one field that you are trying to alter but you have two fields that you are using, gross_recovery(negative value=refund and +value=Cash) and gross_rec_nc which is all NonCash items.
My guess is that you have  a group on a client and then rows of data per type and then a SUm of these in the footer.
if that is correct then likely the SUM in the footer is a formula that sums the rec_nc fields and the recovery_field.
If I am at all close all ou have to do to change your SUm is to create a formual field to zero out your negative values and then SUM that formula field. Just leave the NonCash field out of it altogther.
if {rep41_tbl_detail.gross_recovery} < 0 then 0 else {rep41_tbl_detail.gross_recovery}
 
Is this at all close to your actual report design/function? If not can you explain it or use this idea to make the changes?
 
 
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum