Saturday, February 25, 2012

A question of Sum

Hi,
how can I retrieve the sum till the end of each page and put it in the end
of corresponding page?
Ex: Page1 Page 2
10 40
20 50
30 60
Sum: 60 Sum: 60 (from the previous page) + 150 = 210
Any help would be appreciated.You do not know when paging occurs, expect by having groups break on a
page... SO you would create groups and do the sums in the group footers,
breaking each group on a new page...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Goncalo" <Goncalo@.discussions.microsoft.com> wrote in message
news:125001F8-B57C-4CC2-A7D7-750FECE57E69@.microsoft.com...
> Hi,
> how can I retrieve the sum till the end of each page and put it in the end
> of corresponding page?
> Ex: Page1 Page 2
> 10 40
> 20 50
> 30 60
> Sum: 60 Sum: 60 (from the previous page) + 150 => 210
> Any help would be appreciated.
>|||Thanks for answering the question...
but i still have the same problem when groups expand to more then 1 page,
right?
Goncalo
"Wayne Snyder" wrote:
> You do not know when paging occurs, expect by having groups break on a
> page... SO you would create groups and do the sums in the group footers,
> breaking each group on a new page...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Goncalo" <Goncalo@.discussions.microsoft.com> wrote in message
> news:125001F8-B57C-4CC2-A7D7-750FECE57E69@.microsoft.com...
> > Hi,
> > how can I retrieve the sum till the end of each page and put it in the end
> > of corresponding page?
> >
> > Ex: Page1 Page 2
> > 10 40
> > 20 50
> > 30 60
> >
> > Sum: 60 Sum: 60 (from the previous page) + 150 => > 210
> >
> > Any help would be appreciated.
> >
>
>

No comments:

Post a Comment