Alpha Video Training
Results 1 to 10 of 10

Thread: Counting the no ok filtered records

  1. #1
    Guest
    Real Name
    Cyrus Moultrie
    Join Date
    Sep 2003
    Posts
    25

    Default Counting the no ok filtered records

    My reports Consist of the no. of records filtered from a data bank. how do I count the no. of records that have been filtered and include this no. in the report?

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default

    there is probably more than one way to do this.

    I'd look first to using a calculated field in the report layout that uses tablecount() or dbcount() to compute the number of records that match your filter criteria.

    On the other hand, if you run the query first, and then call a report "based on currently selected records" you could get the count from the query object, and pass it to the report layout using a variable.

    -- tom

  3. #3
    Guest
    Real Name
    Cyrus Moultrie
    Join Date
    Sep 2003
    Posts
    25

    Default

    Tom, I appreciate your responding to my cry for help. I am still having problems and cannot seem to figure out how to do it. One of the simpliest reports that I am generating is the no. of active members we have in our Masonic Lodge. If a person is active The field (Status) is noted as "A". The filter expression is Status="A" This finds all the members that are active in the lodge and are included in the report. At the end of the report I would like to give the count of the number of members who are active. The name of the data base is MEMBER. I generate other reports but this is the simpliest one and if I can figure out how to count the no. of filtered records I can apply this procedure to the other reports. If you can give me any additional help I will appreciate it.
    Cyrus

  4. #4
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default Examples showing alternative approaches

    Cyrus,

    Unzip the attachment to an empty folder.

    The form contains two calc fields that illustrate use of tablecount() and dbcount() to compute a filtered count without running a query against the instance of the table being displayed on screen. These calc fields can be used in your report layout.

    There are two reports also. These illustrate another way to compute the count of records appearing in each report. Note that the calc field expression is the same in each report. The layouts differ only in the fact that one is filtered and the other is not.

    Hope this helps.

    -- tom

  5. #5
    Guest
    Real Name
    Cyrus Moultrie
    Join Date
    Sep 2003
    Posts
    25

    Default

    Again Tom, I appreciate your quick response to my recent request for more help. I downloaded your file and unzipped it. When I tried to run it I got the screen telling me that I had to have the professional version of Alpha 5 to run the data set. Unfourtinately I have the Home Version. The Manual may expound on this application, however, I have not been able to find anything on it. Any suggestions or recomendations that you have now will be appreciated.
    Thanks
    Cyrus

  6. #6
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default

    Suggestion #1 is to mention you're using the Home edition when posting here, I assumed otherwise. However, this is no big deal in this case.

    Create a new database in the same folder where you unzipped my example. Then use Alpha Five to "add" my table to your new database. Both the form and the two reports should show up just fine. Holler if you have trouble.

    -- tom

  7. #7
    Guest
    Real Name
    Cyrus Moultrie
    Join Date
    Sep 2003
    Posts
    25

    Default

    Tom:
    I appreciate your patience with me. I followed your last recommendation and sure enough I have come up with a procedure to count the No. of filtered records in my data bank. I have applied this logic to several of my reports and am happy that I can include the no. of records which have been filtered in the reports. Again thanks a lot. It will please me to know that you have received this. Send me a brief note.

  8. #8
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default

    Great! I'm glad you got it going.

    -- t

  9. #9
    Guest
    Real Name
    Cyrus Moultrie
    Join Date
    Sep 2003
    Posts
    25

    Default

    Tom,
    Now that I have the procedure down to count the no. of records that have been filtered to include in reports I have now been trying to give them a line no. in my reports. That is starting at 1 and ending with the no. of records in the report. However, after looking all the functions available in the home addition I have not come up with anything. I think the main problem I have is not knowing how to properly assign arguements for the function. It appears that the function "every-record-list" might do what I want but i cannot assign arguements that will execute it. I'm sure you have detected that I am rather inexperienced in programming with alpha 5 which is true. However I do have some experience in Basic and Fortran But that is not helping me much in Alpha 5. If you can give me any help I would appreciate it.
    Cyrus At cymoultrie@aol.com

    Cyrus

  10. #10
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default

    Cyrus,

    It's best to put new questions in a new topic. Will get better exposure, and will be easier to find later on.

    You might try putting a new calc field in the detail band (region) of your report layout. This field would display the current value of the mrecno() function. Read the docs to see what the function will produce.

    -- tom

Similar Threads

  1. Counting Records
    By tarlachmoorhouse in forum Alpha Five Version 5
    Replies: 5
    Last Post: 02-03-2004, 05:37 PM
  2. counting records with conditions
    By Angie Boutin in forum Alpha Five Version 5
    Replies: 2
    Last Post: 01-21-2003, 02:31 PM
  3. Counting Records
    By Gordon Wheaton in forum Alpha Five Versions 2 and 3
    Replies: 1
    Last Post: 06-28-2001, 09:44 AM
  4. Counting Records
    By Gordon Wheaton in forum Alpha Five Version 4
    Replies: 1
    Last Post: 06-18-2001, 02:26 PM
  5. Counting records
    By Marlin Humphrey in forum Alpha Five Version 4
    Replies: 5
    Last Post: 05-16-2000, 06:14 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •