• Counting Check Boxes

    Author
    Topic
    #352415

    In a report, is there a way to count the number of checkboxes that are actually checked (rather than just counting the number of records)?

    Viewing 0 reply threads
    Author
    Replies
    • #512484

      If you want this count to appear in a report footer, what you can do is create a text box containing the following calculated field in the detail band so that it calculates for each record:

      =iif([YesNoFieldName]=yes,1,0)

      set the property of the text box to running sum – over all and give it a name, for example YesNoCnt. You can also set visible to No so it does not appear on your report.

      Create a text box in your report footer and place the following calculation referencing the name you gave the text box you placed in the detail section. Example =[YesNoCnt]

      • #512487

        Just as an afterthought to that, you could also use the formula =-[yesnofieldname] as yes is equivalent to -1.

        • #512587

          You could also use Abs(Sum([YesNoField])) as long as the field doesn’t allow a three-state value.

          • #512632

            Charlotte,

            Your suggestion about using the Abs(Sum[YesNoField])) to count the checkboxes worked, as long as I did that in the report footer. Is there any reason why this would not work if I tried to put it in the Page Footer? When I tried to enter it there, it only displayted #Error.

            -Kelley

    Viewing 0 reply threads
    Reply To: Counting Check Boxes

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: