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

Count formula

Status
Not open for further replies.

catchingup

Technical User
May 11, 2006
37
US
I have a subreport in CR11. In the report, I am printing 3 different counts of forms used by a project.

The first 2 formulas are working fine using the formula
Count({form_name.number})

However, the 3rd count is a portion of the 2nd count and I am having problems with it. It should be pulling the Count of form_name.number where form_ID = EXT

I tried putting this formula {@EXT forms} in the detail level: {form_ID} = "EXT"

and then placed the formula
Count({@EXT forms})
in the group footer. But I wind up with the same number (16) as is the count of just the form, which I know is incorrect (the correct number is 4).
I was thinking that variables might be the way to go but wasn't certain how to write it correctly. Any ideas?
Thanks!
 
The count of a formula is the number of times it executes, not the number of times the formula meets the criteria. Change the formula to:

if {form_ID} = "EXT" then 1

Place this in the detail section and right click on it and insert a SUM (not count) on it. Then you can delete the formula from the detail section or suppress it.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top