Report Losing Group Count

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Curious27
    New Member
    • Aug 2022
    • 37

    #1

    Report Losing Group Count

    I have a report that loses it's group count. In the Group Header there are two TextBoxes, "txtMfg" which is bound to and shows the names of manufactures in the table named "tMfg", the second TextBox named "txtMfgCoun t1" counts the number of times "txtMfg' changes in the (Mfg Group), and it's property settings are "=1" in it's Control Source and the Running Sum set to "Over All". I have also set Running Sum to "Over Group" and got the same results.

    In the Report Footer I have a TextBox "txtMCount1 " with it's Control Source at "=[txtMfgCount1]" which shows the number of times "txtMfg" has changed in the Report.

    When the Report is opened in Report View, the Report Footer, "txtMCount1 " shows a number of "8" which is the right number.

    The problem is when I go to Print Preview the textbox "txtMCount1 " shows a number of "1" not the expected number of "8".

    Has anyone ever had this happen, if so how did you fix it.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    What happens if you print the report to the printer? I would hope it matches the Print Preview, but if it matches the Report view then you should be ok.

    Comment

    • Curious27
      New Member
      • Aug 2022
      • 37

      #3
      Hi NeoPa

      Report View shows "8" (Correct Answer)
      Print Preview shows "1"
      Print shows "1".

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32669

        #4
        :-(

        Do you use the Detail Section at all? If not then you can redesign such that each group is a single detail record and then tally more reliably.

        Good & clear response by the way :-)

        Comment

        • Curious27
          New Member
          • Aug 2022
          • 37

          #5
          Thank you.

          I use the detail section to show all the related items to each Mfg .

          Comment

          • Curious27
            New Member
            • Aug 2022
            • 37

            #6
            I just put a TextBox "txtTItem" in the Report Footer to count the Detail Section "txtItems" and it returns the correct value "23".

            Report View "23"
            Print Preview "23"
            Print "23" (Hard Copy)

            This extra TextBox does not affect the Group total as expected.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32669

              #7
              I was afraid that might be the case :-(

              I'm really not sure how I'd go about fixing this if I'm honest. You could possibly capture the OnPrint or OnFormat event procedures and manage your own count, but as print previews can go backwards as well as forward that means subtracting from your count as necessary as well as adding.

              Not sure what to suggest as far as the fundamental design goes though. Sorry.

              Comment

              • Curious27
                New Member
                • Aug 2022
                • 37

                #8
                Thank you for looking at it.

                This problem occurred one other time about a year ago, I did go through some notes but didn't find anything.
                I'll go through all these DB's from that pass and research them, it's here somewhere and when I find the fix I'll share it with you.

                Thanks again...

                Comment

                Working...