Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding formula not working 1

Status
Not open for further replies.

mudflap

MIS
Feb 14, 2002
194
CA
I am adding to formulas together to get a total.
They have worked for all the others but not these two.
ONe subtotal is 3720.. The other is blank when you add the
two together you get a blank Total.
How do I make the other show $0 so they will add together correctly.

Thanks
PEter
 
Convert the null value to zero, with the IsNull function.
 
Ok, I tried that didn't work.

Probably did it wrong.
Took the formula that was giving me problems and
went into the suppress x-2 button and
put in IsNull ({formula})
The formula being one the one I am having troubles with.

What am I doing wrong ??

 
I don't know if it would work this way. Assume that the data type of subtotal field is numeric, try convert the blank field to Number by Val([Blank Field]) and add it up with the subtotal
 
I am really confused with this IsNull feature.

Isnull ({field name})

What exactly does this do?
WHere do I put this?
How do I get it to change to a 0 if null?
 
Click on file, options, and check the "convert bull field value to default" option.

Then your formula will work. Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
Did that that..Still nothing.
There must be an easy way to do this??

Three formulas

ONe adds up one column
One adds up another one.
The other formula totals the two
Because one is blank.. The total formula gives
me a blank field when it adds the two together..

Thanks
{Eter
 
IsNull will have nothing to do with suppressing in this instance. You don't want to suppress the field, do you?

Create the following formula and verify the results:

If IsNull({Column1}) Then 0 Else {Column1}
+
If IsNull({Column2}) Then 0 Else {Column2}

If you don't fully understand any of the operators or functions, F1 is a really comprehensive resource for syntax and appropriate usage.

Good luck,

Naith
 
Thanks Naith that did it.

Thanks for all you help guys, very much appreciated.


P.S Where is a good spot to troubleshoot dll errors and things for crystal reports there website isn't good.


I get this error when trying to refresh my report

"Can't find the right folder and/or store in this Profile. Please logon to your profile and set the datasource location.

I rebuilt my laptop the other day now I get this error.

Thanks
Peter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top