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

COUNT FORMULA 1

Status
Not open for further replies.

wld1957

Technical User
Feb 3, 2006
68
US
Using Crystal Reports 11. Using the following fields:
{cpmain.recedate} {cpmain.totjdgpaid}

I want to total the count of records by year for those records that have a zero balance and for those greater than zero. This would involve only the cpmain.totjdpaid field.

I can get a count of either the records with a zero balance or those that have an amount but I'm having difficulty getting the formula to show both. Any help would be appreciated.
Example:
2009
UNPAID EQUAL TO - (COUNT OF RECORDS WITH ZERO BALANCE)
PAID EQUAL TO - (COUNT OF RECORDS THAT HAVE AMT > ZERO)
I will be breaking it down by year starting in 2002 to present.
Bill
 
If {cpmain.totjdgpaid} IS the balance, then you can use a formula like this:

if isnull({cpmain.totjdgpaid}) or
{cpmain.totjdgpaid} = 0 then
"Unpaid" else
"Paid"

Insert a group on this formula. You need some kind of Account ID field, I think, if {cpmain.recedate} is null if there are no payments. Then you would place the ID field in the detail section, right click on it, and insert a count at the group level.

-LB
 
if {CustomerProgramHistorySummary.Year} = 2005 and <> 0 then {CustomerProgramHistorySummary.NetSales01}

Above formula does not work.
 
c123456rystal,

Please start your own thread, and please try to spend more time on your posts. What is the question here, and what are you trying to do?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top