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!

count not working in crystal

Status
Not open for further replies.

ncchish

Programmer
Jul 29, 2002
86
US
I’m having trouble getting a count. I’m using crystal 11. I have totals in the group footer and the detail line has the breakdown of what is in my footer. What is in the detail section adds up to what is in the GF. The problem is I need to get a count of the producers in the detail section who have amounts > 1 to show on the GF row. So, for the example below I would have a count of 2 since 2 producers in the detail section have amounts > 1. My formula is not working and I'm not sure if I have it set up correctly. Any help would be appreciated. Thank you.

Formula:
//count
If (sum({TABLE_A.PROD_AMT},{TABLE_A.RPT_NBR})) > 1.00 then DistinctCount ({TABLE_A.RPT_NBR}, {TABLE_B.AGCY_NBR})


GF: Agency total: $25,000 2 producers
Det: John Smith $0
John Doe $24,000
J. Cash $1,000
b.White $0
 
You should consider using the running total expert, but usually I just create a formula in the details section and suppress it:

if {TABLE_A.PROD_AMT} > 0 then 1 else 0

Then you can create a sum in both the group footer and report footer.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top