Re: Running Total .. wrong total

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Craig (brokenleg_at_heartattack.com)
Date: 07/05/04


Date: Mon, 5 Jul 2004 10:13:44 +0100

Just re-read my posting. The:

shared numbervar runTotPC;
runTotPC;

formula is used in my header AND footer.

"Craig" <brokenleg@heartattack.com> wrote in message
news:40e91aa4$0$7806$db0fefd9@news.zen.co.uk...
> I have now swopped to a forumula to keep my running total.
>
> Worked 100% on the first page (Which used to include the value of the
first
> record of the next page in the running total field).
>
> HOWEVER, now, the page header on page 2, which should show the value of
the
> page footer on the previous page, shows the previous page total, PLUS the
> first record on the next pages total! So it's wrong there now.
>
> Agghh!
>
> Basically, I have a hidden formula in the detail section:
>
> shared numbervar runTotPC;
> runTotPC := runTotPC + {table.fieldnametoadd};
>
> Then, in the page footer and page header, I have:
>
> shared numbervar runTotPC;
> runTotPC;
>
> As I say, works great on the first page (Where the page header is
> supressed,a s it's the first page). But then added the first record total
on
> the second page to the page header!
>
> Something like:
>
> PAGE 1:
>
> Rec 1 100
> Rec 2 200
> Rec 3 150
> ..
> ..
> ..
>
> Page Footer: 450 <---- Correct...
>
>
>
> PAGE 2:
>
> Page Header: Running total: 500 <--- Wrong! Because Rec 4 is included.
>
> Rec 4: 50 <--- added to page header!!
> Rec 5: 100
> Rec 6: 200
>
> Page footer: 800
>
>
> See?
>
>
> "Craig" <brokenleg@heartattack.com> wrote in message
> news:40e90f9e$0$7792$db0fefd9@news.zen.co.uk...
> > I have a report that shows n number details sections on a page. At the
end
> > of each page, I have a running total displayed. However, I find that
this
> > total is wrong, and I have found the pattern why.
> >
> > It looks like crystal (v7) adds the field that I am summing up, to the
> > running total, and then adds that detail section to the page. However,
if
> cr
> > finds it's at the end of the page, and that the detail secion is too
large
> > for the page, it (correctly) moved it to the next page. However, the
total
> > on the previous page still includes the value of the detail section
moved
> to
> > the next page!
> >
> > Is this possible? And if so, is there a way to resolve this?
> >
> >
>
>



Relevant Pages

  • Re: Running Total .. wrong total
    ... record of the next page in the running total field). ... HOWEVER, now, the page header on page 2, which should show the value of the ... Then, in the page footer and page header, I have: ... But then added the first record total on ...
    (microsoft.public.vb.crystal)
  • Re: Perl script to clean up file -- Dont know if it can be done
    ... > has a header and footer, as well as page breaks, this is all in ASCII ... I need to pull out just the columns. ... > always seems to be a 0 at start of the first record. ...
    (comp.lang.perl.misc)
  • Perl script to clean up file -- Dont know if it can be done
    ... This is the problem I get a file that I must pull the pertanent data out. ... I do this all manually (delete the header and footer, ... always seems to be a 0 at start of the first record. ...
    (comp.lang.perl.misc)
  • Re: unlink Footer/Header in VBA
    ... AutoText it will bring the section break with it. ... Header, a footer and Bibliography all in one. ... Bibliography" and another for "Footer for Bibliography". ...
    (microsoft.public.word.vba.general)
  • Re: Header and Footer with RichTextBox Control
    ... I send the footer and header to RTB when it is prining but I ... In that case the RTB will print its contents within that area of the page and you will know exactly what the minimum top and bottom margins of the printed pages will be. ... If the above is approximately what you are currently doing then all you need to do is print the header and the footer within the specified top and bottom margins, normally with the "nearest to the edge" vertical position of the header or footer text about half of the margin size from the edge of the page. ...
    (microsoft.public.vb.general.discussion)