Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004

    Unanswered: Need help with counts in a report


    I am in need of some serious help with a report. I am trying to create a report that summarizes testing activity for a certain time period.
    The majority of the data comes from only one table, however the data needs to be grouped on a foreign key linked to a look-up table. Here’s a summary.
    Name: tblTests
    PK: TestID
    FK: TestReasonID – from tblTestReason
    Fields involved in report:
    TestRes – Number, Double
    ConfTestRes – Number, Double

    Ok, so here’s what I need to do… A pop-up prior to displaying report will gather criteria for underlying recordset (do not need assistance with this). This will result in all of the test records for a certain company during a certain time period. The report will need to be grouped on the TestReasonID, and then display a count of all of the tests for that TestReasonID that meet certain criteria, such as having a result >=0.02 and < 0.04 or having a result >= 0.04, total number of tests for that TestReasonID, etc.
    So an example might be:
    Test;# >=0.02 but <0.04;# >=0.04;Total Tests
    Accident;1; 2;3

    Then I need Grand Totals of all tests at the bottom.

    I have tried grouping based on TestReasonID and then creating unbound text box with ControlSounrce = Sum(abs([ConfTestRes]>=0.02 and [ConfTestRes]<0.04)) but the result from the first group is carried to the next group. I need the count to reset for each group so that the numbers displayed are only related to the specific TestReasonID.

    I hope that this makes sense. If this is something best accomplished in VBA, that is fine too as long as someone can point me in the right direction.

    Thanks in advance for any help!


  2. #2
    Join Date
    Nov 2004

    Fix it....

    I figured out why my counts were not group specific. I had the text
    box in the detail section rather than in the group header. Once I
    moved it to the group header, the counts worked correctly. No need for
    further replies.


Posting Permissions

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