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!

Sum dollar field when date field isnull 1

Status
Not open for further replies.

JeaLee

Technical User
Oct 20, 2005
6
US
This data comes from an SQL2000 database and I am using Crystal Reports v8.5. (All of the reference material I have is for 9.0, which is only confusing me more.)

My report is working beautifully, until I got to this request.

The report is grouped by accounts, and detailed by line items:
Item - Dollar Amt. - received date - closed date
1 $30 11/1/2005 11/10/2005
2 $40 11/1/2005
3 $80 11/2/2005 11/18/2005

I need a group and report dollar total for all items with closed dates.
 
Please clarify. What do you want the output to look like.

In general, you can create a formula such as:
If IsNull({closed_Date} Then {Dollar_amt} ELSE 0

If you sum that formula, you would get the total amount for cases with no closed date.

hth,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
This was flagged with no replies - thanks for answering and sorry I didn't reply!

The group level output should be:
Total received: $150 Total Closed: $110
 
Just tweak the suggestion above to create a formula such as:

If IsNull({closed_Date} Then 0 ELSE {Dollar_amt}
Then SUM that formula to produce the group total. For example: SUM({@MyFormula}, {Account_ID})

Cheers,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top