Totals Not Correct When Printing Report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mmmel
    New Member
    • Feb 2010
    • 52

    Totals Not Correct When Printing Report

    Hi again! Didn't think I'd be back so soon, did ya? :)

    New (but related) problem...I have the report all done, it's beautiful, displays all the right numbers in all the right places when viewed in REPORT view, BUT...When I print or print preview it, all the bloody numbers change! ARGH! I've been searching the internet for the answer and many people acknowledge this fact, but no one seems to have a good work-around for it.

    The numbers that change are the numbers that I used the running sum to calculate - that is, the final bank account balance, the sum of the incomes, and the sum of the expenses. I calculated them at the end of the report, then hid them and created text boxes at the start of the report to display those values. Near as I can tell, the printed version recalculates those numbers based ONLY on the very first entry in my detail section.

    How can I get around this? I'm getting ready to just use a screen capture program for now, to get the report in on time, but there HAS to be a better way!

    Can you help? Sorry to be such a pest. I'm just really, really stymied! Cheers!

    Melody
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32656

    #2
    This thread was created from a new post in How to display a value from an unrelated query in a report, as questions need to be in their own threads.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32656

      #3
      As for your problem, this depends on the details of exactly what you did where. I understand the running total figures aren't properly totalled until the end of the report, so I guess in Print or Print Preview mode, they grab the figure before it's fully ready. When opening the report in Report View, it is also displayed thus originally, but as the report progresses, gets updated to reflect all the changes. As all this happens before the report even shows you wouldn't see this and only see the final version.

      To understand exactly what is happening, and potentially to consider a way around it, I'd need to know the details of what is designed where (particularly which sections).

      Comment

      • Mmmel
        New Member
        • Feb 2010
        • 52

        #4
        Thanks for moving my question, NeoPa! If you can figure it out, you would be the first on the internet!

        My report consists of 5 sections:

        1. Report Header
        2. Page Header
        3. Detail
        4. Page Footer
        5. Report Footer

        (Pretty standard) The detail contains three non-visible text boxes. One control source looks like this:
        Code:
        =IIf([Income or Expense?]="IN",[Amount],0)
        (a second one is the same but sums up the EXpenses). I have these set to sum over group. These give me the total of the Incomes and Expenses, respectively.

        The third non-visible text box contains this as the control source:
        Code:
        =IIf([Income or Expense?]="IN",[amount],[Amount]*(-1))
        This just keeps INcomes positive, and sets the EXpenses to be negative.

        Then, I have (also in the Details) section a visible text box that takes the starting balance (from the Report Header) and adds to it the output of the third non-visible text box. This gives me the running bank balance. It works perfectly. No problem.

        Then, in the report footer, I have three non-visible text boxes that show the final INcome total, EXpenses total, and the last running total amount (which corresponds to the bank account end balance). This also works perfectly fine in both report and print preview.

        Where it all falls apart is when I try to display those three values in the Report Header. I really would like the final totals to be shown FIRST in the report, rather than making people flip to the last page. I just set three controls to be equal to the text box names, i.e., one is
        Code:
        =[text82]
        These three numbers display perfectly fine in Report view, but act as though they only got to the first Detail entry in the Print Preview.

        So, the question is, how do I get it to NOT do this?! I want it to print what I see!

        Am I making any sense at all? Thanks in advance for any insights!

        Melody

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32656

          #5
          Mmmel, the explanation is clear (I'm quite particular and this even does for me). Where the problem lies, is the expectation of being able to see final values in the Report Header section. This can work in standard Report View, due to the nature of being able to update all the fields as the report is processed. In Print Preview or Print Views, this is not so logical. It tends to work on the header sections before the footer sections, and the first record is always available as current to the header sections.

          What this means, I'm afraid, is that this information will not be available for the headers. It's fundamentally the difference between seeing the data on the screen and printing it to hard-copy. The latter two Views must be equivalent to the hard-copy, whereas Report View has the luxury of updating the Header Section after the Footer Section has been formed to reflect the change in the data that it refers to (which is a control in the Footer section). Does that make sense?

          I know the news isn't great, but at least you can then look at either removing the display from the Header Section, or obtaining the data an alternative way (EG DSum()s etc).

          PS. Is Mmmel just a version of Mel that is how you would say it when you see some nice chocolates? Mmmmm Mel?

          Comment

          • Mmmel
            New Member
            • Feb 2010
            • 52

            #6
            Hi!

            Thanks, NeoPa! I figured it had to do with the way that Access calculates things. I think I'll pull the final account balance from the same table I pulled the starting balance (then I'll just make sure my final running sum is the same). This is kind of better anyways. It gives a quick and easy way to reconcile. I'll just sum my incomes and expenses at the bottom, just as the bank does. It's enough.

            The most valuable thing that you just taught me was to GIVE UP (was THAT the message you were trying to deliver? :D ). Seriously, I'm grateful.

            Mmmel is a screen name that Babycenter made up for me ages ago. I kind of liked it, so I kept using it. I think it makes me sound kind of spicy! Hee hee!

            Cheers!

            Melody

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32656

              #7
              It's not a lesson to give up Spicy Mel! Merely to recognise when the horse is dead. There'll be other challenges ahead, and most have solutions. Don't waste your energies on the ones that don't ;-)

              Comment

              • Mmmel
                New Member
                • Feb 2010
                • 52

                #8
                Thanks again! My report turned out grand! (Oh, and I do have other challenges...tr ust me! I'm looking for an answer to another one now!)

                Have a great day!

                Comment

                • NeoPa
                  Recognized Expert Moderator MVP
                  • Oct 2006
                  • 32656

                  #9
                  8-)

                  Let me know if you post it here.

                  Comment

                  Working...