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

YTD Totals fomula

Status
Not open for further replies.

samimichaels

IS-IT--Management
Nov 17, 2000
20
US
I am trying to find a year to date totals on checks that have been run.

Here is what i am running:
if {CGD_DIST_HEADER.CHECK_DATE}> DateTime (2001, 12, 31,00, 00, 00)then Sum ({CGD_DIST_DETAIL.CHECK_AMOUNT})

This is giving me everything. But I just want the sum where the check date is after 12/31/01.
 
Change your formula to:

if {CGD_DIST_HEADER.CHECK_DATE}> DateTime (2001, 12, 31,00, 00, 00)then {CGD_DIST_DETAIL.CHECK_AMOUNT} ELSE 0

Place it in the detail section and sum it.

Alternatively, create a running total with that condition.

hth,
- Ido CUT (Crystal UTilities): e-mailing, exporting, electronic bursting & distribution of Crystal Reports:
 
Or if all you'r trying to get is those rows.

In the record selection criteria place:

{CGD_DIST_HEADER.CHECK_DATE} in yeartodate

This will only return rows for this year.

You can also use "yeartodate" in lieu of hardcoding the start of year date in your formula.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top