Source language: Translate to:

Report Count fields

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Report Count fields

Postby BRobinsonS » Sat Jan 17, 2015 7:32 am

Is it possible to count the number of fields containing a certain value?

For example, in my membership software in a certain report I would like to count the number of members who are active and who are not active.
At the end of the report I would like to summarize e.g. Active = 125 InActive = 63 Total Membership = 188.

Don't see a way to do this within Report Designer.
Is there a function similar to Count(If "ActiveStatus" "=" "False") ?
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 340
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Re: Report Count fields

Postby Gaev » Sat Jan 17, 2015 8:21 am

Brian Robinson:

Is it possible to count the number of fields containing a certain value?

Is there a function similar to Count(If "ActiveStatus" "=" "False") ?

I think you meant to say "number of records containing a certain value in a specified field" ... if so ...
Code: Select all
dbpQuery "yourID" "yourTable" "ActiveStatus = 1"
AlertBox "Active Count" "[ID.Table.$RecCount]"
etc. etc.


Don't see a way to do this within Report Designer.
For example, in my membership software in a certain report I would like to count the number of members who are active and who are not active.
At the end of the report I would like to summarize e.g. Active = 125 InActive = 63 Total Membership = 188.

I don't know about the Report Designer ... but you could ...

a) just write "Active = [ActiveCount] InActive = [InactiveCount] Total Membership = [TotalCount]" to a Text file ... and then print it.

b) have a Dummy Table ... e.g. ActiveInActiveCounts ... with 3 fields (ActiveCount, InactiveCount, TotalCount) ... and 1 record which is populated with [ID.Table.$RecCount] from the 3 queries ... then do a Report of this Dummy Table.
User avatar
Gaev
 
Posts: 3734
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Report Count fields

Postby Neosoft Support » Sat Jan 17, 2015 10:22 am

Take a look at the Formula Tool in the Report Designer. It allows you to perform simple calculations (like count) on fields. Details in the help file.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Report Count fields

Postby BRobinsonS » Sun Jan 18, 2015 8:45 pm

I am using Count as in the Help file but it doesn't allow for Conditional 'counting'.

In the report summary if would like 'Count if Field = False' in one variable and other one could be 'Count if Field = True'.
Brian Robinson
'When all else fails, try again!'
www.ComputerSoftwareSystems.com
User avatar
BRobinsonS
 
Posts: 340
Joined: Sun Sep 25, 2005 9:00 pm
Location: Ontario, Canada

Re: Report Count fields

Postby Neosoft Support » Mon Jan 19, 2015 11:14 am

To do a conditional count you would need to sort that table on that field. You could then use a group partition in the report to display the totals for each.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest