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!

Conditional Sum 1

Status
Not open for further replies.

Edimator

IS-IT--Management
Mar 13, 2001
49
VE
Hi, I´m a new user in Crystal Reports 8, and need some help to answer the following question.

I´m doing a report that has two parameter value (begin and end date).
The report has a total column. This column has to have an initial value that I will use it to add to each detail record of the report. This initial value must have a value that sum the records only until one day before the begin date.
I´m trying to create a formula column that summarized the records, but it shows the sums of all the values not only until the begin date.
My question is, if I can create a formula column that sum values until a certain condition (eg. < {begin date}),
or I have other many options to do that.

Thanks.





 
Conditional totals are described in my FAQ on common formulas (1.B). You create a formula:

If {date} < {?start}
then {amount}
else 0

then you total this formula.

Don't forget that those records have to be in the report or you won't have them there to total. You will have to include them and suppress them, or you will have to do a subreport to include them.

This isn't by any chance a general ledger detail with an opening balance is it? Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top