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!

Using "Count" summary field with conditions on members in group

Status
Not open for further replies.

Idelji

Programmer
Sep 17, 2004
2
US
Hello,

I am using CR 8.5. My problem is that I have a list of files with names repeated. However some of their other attributes differ. I have created a group based on these file names.
If I do a simple count of how many files with a particular name(basically a group count)using Count(filename,filename) in the group header I am getting correct answer.
Now I need to do a count of files within a group which satisfy certain attribute conditions like filename.lengthoffile = 80.
I tried using "Count(filename,filename,cond)"
for cond above I used a formula with boolean return value, it gives me syntax error.

I would appreciate if anyone could give an example of what should go in "cond" in "Count(filename,filename,cond)" or suggest any other way to solve this problem.

Thanks and Regards,
Gaurang
 
Use a Running Total with a Evaluate->Use a Formula

Set to aggregate function to a distinctcount, and in the Evaluate->Use a Formula use:

{filename.lengthoffile} = 80

Now you'll get the distinct count fo those with that attribute.

-k
 
You could also create a formula to be placed in the detail section:

if {filename.lengthoffile} = 80 then 1

Then right click on the formula and insert a summary (SUM, not count). Formulas generally execute faster than running totals, so I usually try the formula route when possible.

The condition in "Count(filename,filename,cond)" is only for dates to specify whether the group is weekly, monthly, etc., and cannot be used for other datatypes.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top