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!

totalling running total totals (confused? ME TOO!!)

Status
Not open for further replies.

gatwork

Technical User
Aug 29, 2001
6
US
I wish to get the grand total of a dozen or so running totals. Each RT has a different set of selection criteria made of multiple, non-repeating groups. Each of the RT's displays in the report properly. I created a formula that simply adds each of the RT's by name (to crossfoot to another amount in the report). The problem is that if any of the RT's is null, the entire GT formula is compromised and nothing appears on the report where the GT should. If i // the RT's that are null, the formula works like a charm. I have tinkered with various if-then-else combos to no avail. What am i missing?
 
Uder file, report options, check thge 'conver null field values to default" option, and try this again.

Please post your findings. Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
thanx, but been there, done that. NG. I have also set null values to zero in the GT formula and that doesn't work either . . . .
 
If you are using running totals to do conditional totals and the evaluate is set to 'for each record" then there is a better approach. Instead of each running total, write a formula that is:

If (the conditon you were using in the running total}
then (Field you were totalling)
else 0

Then sum these formulas using Insert Grand total or Insert Summary. These totals will never return null values. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Thanx, Ken, for your website and your advice. My evaluation is not "for each record", but a formula that sites the evaluation criteria. I thought about your suggestion and i think we're getting close:
I have a series of invoices grouped by vendor name. Each of my RT's is the total of all the (specified) vendors (all of which should be posted to a particular account). The GT of the various RT's produces a blank on the report if any of the RT's is without value (no invoices from any of the specified vendors in that RT's evaluation formula).
It seems to me that your suggested @ is currently being done by my evaluation @. How do i get the effect of "else 0" when using the RT expert?
 
That is the rub, I don't think you can.
Post your evaluate condition, I think you can still use my technique. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I had a simialr problem with running totals

My summary formula of
{#RT1} + {#RT2} +...
messed up if any of the values were null.

Report options - Convert NULL to default only works on DB fields - it doesn't work on Running Totals.

The solution was
whileprintingrecords;
numbervar t;
if not isnull({#RT1}) then t:= t = {#RT1};
if not isnull({#RT2}) then t:= t = {#RT2};
if not isnull({#RT3}) then t:= t = {#RT3};
if not isnull({#RT4}) then t:= t = {#RT4}; // etc...

t
Editor and Publisher of Crystal Clear
 
I think those = were supposed to be + Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Excellent work by the Kiwis!! Ain't the Internet GREAT?! No need to say it works perfectly - you already knew that. Just one more piece of valuable info from the brains at Crystal Clear. And thanks, Ken, for the = to + clarification and your previous suggestions.
You guys are really great to bother with us lesser beings. Hats off to you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top