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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Totals..why undependable? 1

Status
Not open for further replies.

WDfog

Programmer
Oct 16, 2000
26
US
I'm creating some reports in Crystal version 7 with SQL Server 7, and have found the running totals to be troublesome. (My data sources are stored procedures.) The simplest of requirements (sum everything) can leave out a number and cause an incorrect result. I read one of the FAQs posted here on how to do running totals, and even it noted that I should use running totals at my own risk with versions 7 and lower. While it did help my sanity and my ego, I cant say that increases my faith in the product.

Has anyone else run into this problem? And is it truly a common error that I should avoid like the plague by doing all and any math in my stored procedures?

I appreciate the insight.
WDFog
 
As you know there are several types of running totals. If you write running totals using incremented variables you should have no problem with any version of Crystal. See the FAQ on running totals and see the "3 formula" technique. I would avoid the short-lived RT functions, since I think they made things more confusing.

The only problem that I have had with these running totals is when you run into Null values. Null values can cause problems in any formula, nut just running total forumulas. If you use the IsNull function to deal with Null values you should be fine.

Crystal also has a feature that is new with V7 which creates a running total for you. You give up a bit of control but you don't have to worry about keeping track of variables and reset formulas. These had a problem in V7 if you used group evaluation with certain settings like "Keep Group Together" or "Repeat Group Header on Each New Page". In most of these cases you would get extra values. These were fixed in V8.

Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top