Notices


Reply
 
LinkBack (1) Thread Tools Display Modes

Old 01-29-2008, 01:26 PM   1 links from elsewhere to this Post. Click to view. #1 (permalink)
Junior Member

Join Date: Jan 2008
Location: New Jersey
Posts: 6
Rep Power: 0 Roesing is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

Help With a Crystal Formula

I am trying to run a formula that will look at an amount funded field if it is greater than 0 look at the outright gift if that is greater then 0 put a 0 in the field with the formula then look at the booked pledge and if that is greater then 0 put a 0 in the formula field if it doesn't meet any of these requirment it will put the amount funded. It does not work. I have pasted one of many formulas that I tryed. I never get an error but it never puts the amount funded in the field.

IF {MG_Turf Field Report.CnPrProp_1_01_Amount_Funded}>0 then
IF {MG_Turf Field Report.CnGf_1_01_Amount}>0 then 0 else
IF{MG_Turf Field Report.CnGf_2_01_Amount}>0 then 0 else {MG_Turf Field Report.CnPrProp_1_01_Amount_Funded}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-29-2008, 01:38 PM   #2 (permalink)
Crystal Reports Guru

DrewAllen's Avatar

Join Date: May 2006
Location: Philadelphia, PA
Posts: 1,155
Rep Power: 4 DrewAllen is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Information Edge (TIE)
- API/VBA

If the Amount Funded is Null, then your formula will return Null. You need to check whether the amount funded is null first.

Drew
__________________
J. Drew Allen
Children's Hospital of Philadelphia

Crystal Reports and SQL Server Consultant

It is better to live your destiny imperfectly than to live an imitation of somebody else's life with perfection.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-29-2008, 01:41 PM   #3 (permalink)
Junior Member

Join Date: Jan 2008
Location: New Jersey
Posts: 6
Rep Power: 0 Roesing is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

Some are and some aren't. We only want to show the amount funding if there is no outright gift or booked pledge
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-29-2008, 02:06 PM   #4 (permalink)
Crystal Reports Guru

DrewAllen's Avatar

Join Date: May 2006
Location: Philadelphia, PA
Posts: 1,155
Rep Power: 4 DrewAllen is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Information Edge (TIE)
- API/VBA

This is why you need to check for null values. Crystal stops evaluating as soon as it encounters an unhandled null value and returns null. If the amount funded is null, it doesn't even look at the other amounts, it just aborts evaluation and returns a null.

Drew
__________________
J. Drew Allen
Children's Hospital of Philadelphia

Crystal Reports and SQL Server Consultant

It is better to live your destiny imperfectly than to live an imitation of somebody else's life with perfection.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-29-2008, 02:18 PM   #5 (permalink)
Junior Member

Join Date: Jan 2008
Location: New Jersey
Posts: 6
Rep Power: 0 Roesing is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

so are you saying that if the outright gift or the booked pledge are null it wont even continue and look back at the amount funded. So I will need to write a formula saying if outright gift is null put 0.00 and the same with book pledge so that there are numbers in the fields?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-29-2008, 04:45 PM   #6 (permalink)
Crystal Reports Guru

DrewAllen's Avatar

Join Date: May 2006
Location: Philadelphia, PA
Posts: 1,155
Rep Power: 4 DrewAllen is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Information Edge (TIE)
- API/VBA

Pretty much, but it might not even get that far.

Your first expression is Amount Funded > 0. If the amount funded is null, it aborts the expression.

If the amount funded is not null and it's greater than zero, then it will go to the next expression. If the gift1 amount is null, it will again abort the expression and return null.

The only way that your current formula will return the amount funded, is if all three values are not null and the two gift amounts are equal to zero.

(Technically, if the amount funded is null, the formula will also return null and in a sense will be the same as the amount funded, but not because it's returning the value in amount funded which happens to be null. It's returning null, because it cannot evaluate the expression.)

Drew
__________________
J. Drew Allen
Children's Hospital of Philadelphia

Crystal Reports and SQL Server Consultant

It is better to live your destiny imperfectly than to live an imitation of somebody else's life with perfection.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-29-2008, 04:52 PM   #7 (permalink)
my feet hurt.

Melissa Siobhan's Avatar

Join Date: May 2006
Location: Connecticut
Posts: 1,452
Rep Power: 4 Melissa Siobhan is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

LOL Drew. You are too funny. To those of us just catching on to crystal it took me aa while to read this response but I finally get it.

Can the report be programmed to have a use a default for null as $0? would that make the expression above work properly?

If not, Roesing, can you maybe explain what you want in more plain english for me because it sounds like you need to completely reformulate this expression (and deal with nulls)
__________________
Melissa S. Graves

Director of Development Services
The Village for Families and Children
www.villageforchildren.org



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-30-2008, 07:20 AM   #8 (permalink)
Junior Member

Join Date: Jan 2008
Location: New Jersey
Posts: 6
Rep Power: 0 Roesing is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

So how would I write the formula in the amount funded field. I know in acces I can us nz but I don't think that applies to crystal.
Just to let you know I went to the File options put down menu and file report and checked the box convert null field value to default and it still doesn't work.

Last edited by Roesing; 01-30-2008 at 07:28 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-30-2008, 07:31 AM   #9 (permalink)
Junior Member

Join Date: Jan 2008
Location: New Jersey
Posts: 6
Rep Power: 0 Roesing is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)

Sorry wrong window got it. Once I switched the report options to default it worked. Why doesn't the book make that a bit clearer? Thanks everyone. I am sure I will be back with more questions in the future.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 01-30-2008, 09:03 AM   #10 (permalink)
Crystal Reports Guru

DrewAllen's Avatar

Join Date: May 2006
Location: Philadelphia, PA
Posts: 1,155
Rep Power: 4 DrewAllen is on a distinguished road

Blackbaud Products
- Raiser's Edge (RE)
- Information Edge (TIE)
- API/VBA

Quote:
Originally Posted by Melissa Siobhan View Post
LOL Drew. You are too funny. To those of us just catching on to crystal it took me aa while to read this response but I finally get it.

Can the report be programmed to have a use a default for null as $0? would that make the expression above work properly?

If not, Roesing, can you maybe explain what you want in more plain english for me because it sounds like you need to completely reformulate this expression (and deal with nulls)
It's so much easier to explain this with pictures (flowcharts).

You can go into the Report Options and set the "Convert Null Values to Default". It sounds like Roesing has done this.

In Crystal XI, you can set this option just for the one formula. I actually prefer keeping the null values in most cases, particularly when dealing with amounts. Sometimes it helps to distinguish between a null value and a $0 value.

In Crystal 8.5, you can use IF...THEN...ELSE and IsNull() and either store the result in a variable or create a sub-formula which you can then use in your main formula.

Drew
__________________
J. Drew Allen
Children's Hospital of Philadelphia

Crystal Reports and SQL Server Consultant

It is better to live your destiny imperfectly than to live an imitation of somebody else's life with perfection.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
crystal formula nightmare


LinkBacks (?)
LinkBack to this Thread: http://www.blackbus.org/forum/crystal-reports/3026-help-crystal-formula.html
Posted By For Type Date
How To Get Support for Raiser's Edge | eHow.com This thread Refback 08-13-2008 11:04 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Cheap Electricity - Renegade motorhomes - Mobile Phones - Credit Cards
All times are GMT -6. The time now is 06:12 AM.

Miscellaneous


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by BBpixel Team 2008 :: jvbPlugin R1012.364.1

SEO by vBSEO 3.2.0 Copyright 2008 Blackbaud User SocietyAd Management by RedTyger
Inactive Reminders By Icora Web Design

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64