Discussion:
Group Totals (Sub Totals)
(too old to reply)
Paul
2008-01-31 11:44:03 UTC
Permalink
Hi -

I originally posted this issue 10 days ago in the Rave news server -
but so far have had no response. I cant believe that its an unusual
problem (as many people will have resports that require sub-totals)

The news server did not seem that active at the moment (not many
posts/ answers recently) So Im hoping someone can help me from the
Delphi camp ;).



I am using Delphi 2005 with Rave 6.0.1.
Here is a summary of the problem..

I have a report the following structure..

Master...
Detail1
Detail2
------------------------------------------
Group Footer (controlled by Detail1)
Group Footer Total = [Sum(Detail1) + SUm(Detail2)]


I would like to have group totals which sums the totals for Detail1
and Detail2 and adds these together and show on the group footer.

Here is further explanation of what I am attempting to do and the
problems Im having.,.

Loading Image...

Loading Image...

I have 2 CalcTotal components placed on the group footer.

Caltotal1 is set to total a column from Detail1 and has Detail1 set as
its controller. The result is stored in parameter (called param1 for
sake of example)

Caltotal2 is set to total a column from Detail2 and has Detail2 set as
its controller.The result is stored in parameter (called param2 for
sake of example)


I then have a CalcOp component placed on the Group Footer (along with
the 2 CalcTotal components) and this is set to add the 2 parameters
(param1 and Param2) and place the result in another parameter called
GroupTotal.

All seems to work ok - but for some reason - the totals are not in
step with the results expected. The first group total is blank - the
second shows total for the previous group (the missing one.)

Can anyone please advise me as to where I may be going wrong , or how
I can simply add the 2 totals together to give a total for that group
?

Any help would be much appreciated.

Cheers..

Paul.

OS : Windows XP Service Pack 2
Delphi : 2005 Service Pack 3 Installed
Version 9.0.1935.22056
CPU : AMD 3500+
Memory 1Gig
delfo
2008-02-01 13:08:07 UTC
Permalink
Post by Paul
All seems to work ok - but for some reason - the totals are not in
step with the results expected. The first group total is blank - the
second shows total for the previous group (the missing one.)
I think the problem may be the order of the components in the project
treeview, as explained here:

http://dn.codegear.com/article/31917
Paul
2008-02-04 10:48:26 UTC
Permalink
Ok, Thanks for your reply Defo - Will look into that article.
Post by delfo
Post by Paul
All seems to work ok - but for some reason - the totals are not in
step with the results expected. The first group total is blank - the
second shows total for the previous group (the missing one.)
I think the problem may be the order of the components in the project
http://dn.codegear.com/article/31917
OS : Windows XP Service Pack 2
Delphi : 2005 Service Pack 3 Installed
Version 9.0.1935.22056
CPU : AMD 3500+
Memory 1Gig
Paul
2008-02-05 10:44:08 UTC
Permalink
Post by delfo
Post by Paul
All seems to work ok - but for some reason - the totals are not in
step with the results expected. The first group total is blank - the
second shows total for the previous group (the missing one.)
I think the problem may be the order of the components in the project
http://dn.codegear.com/article/31917
Hi again -

I have check the ordering of components/totals and I cannot see any
problems. I have a group footer with 2 CalcTotal components, both
seem to work fine. The totals are correct for the group. Its when I
try add these together (using a calcOp component) that I have
problems.

I have a CalcOp component that adds the 2 together and places the
result in a parameter called GroupTotal. This is always zero for some
reason.

So if anyone can help - please let me know as I am completely stuck
here.

Thanks.

OS : Windows XP Service Pack 2
Delphi : 2005 Service Pack 3 Installed
Version 9.0.1935.22056
CPU : AMD 3500+
Memory 1Gig
Thomas Pfister
2008-02-05 13:55:44 UTC
Permalink
Paul,

upload the rav-file on the binaries-area in the nevrona.com-newsgroups, I'll
look into it!

:-) thomas
Post by Paul
Post by delfo
Post by Paul
All seems to work ok - but for some reason - the totals are not in
step with the results expected. The first group total is blank - the
second shows total for the previous group (the missing one.)
I think the problem may be the order of the components in the project
http://dn.codegear.com/article/31917
Hi again -
I have check the ordering of components/totals and I cannot see any
problems. I have a group footer with 2 CalcTotal components, both
seem to work fine. The totals are correct for the group. Its when I
try add these together (using a calcOp component) that I have
problems.
I have a CalcOp component that adds the 2 together and places the
result in a parameter called GroupTotal. This is always zero for some
reason.
So if anyone can help - please let me know as I am completely stuck
here.
Thanks.
OS : Windows XP Service Pack 2
Delphi : 2005 Service Pack 3 Installed
Version 9.0.1935.22056
CPU : AMD 3500+
Memory 1Gig
Paul
2008-02-06 10:11:30 UTC
Permalink
That would be excellent Thomas - thanks!

Appreciate you looking whatever the result.

Anyway, I have posted the Rav file to nevrona.public.binaries
entitled "Group Totals - Attention -> thomas"

I will check here (and Binaries on Nevrona) for your reply.

Many thanks again ..
Cheers..
paul.

On Tue, 5 Feb 2008 14:55:44 +0100, "Thomas Pfister"
Post by Thomas Pfister
Paul,
upload the rav-file on the binaries-area in the nevrona.com-newsgroups, I'll
look into it!
:-) thomas
Post by Paul
Post by delfo
Post by Paul
All seems to work ok - but for some reason - the totals are not in
step with the results expected. The first group total is blank - the
second shows total for the previous group (the missing one.)
I think the problem may be the order of the components in the project
http://dn.codegear.com/article/31917
Hi again -
I have check the ordering of components/totals and I cannot see any
problems. I have a group footer with 2 CalcTotal components, both
seem to work fine. The totals are correct for the group. Its when I
try add these together (using a calcOp component) that I have
problems.
I have a CalcOp component that adds the 2 together and places the
result in a parameter called GroupTotal. This is always zero for some
reason.
So if anyone can help - please let me know as I am completely stuck
here.
Thanks.
OS : Windows XP Service Pack 2
Delphi : 2005 Service Pack 3 Installed
Version 9.0.1935.22056
CPU : AMD 3500+
Memory 1Gig
OS : Windows XP Service Pack 2
Delphi : 2005 Service Pack 3 Installed
Version 9.0.1935.22056
CPU : AMD 3500+
Memory 1Gig
Thomas Pfister
2008-02-07 19:08:04 UTC
Permalink
Paul,

look into the binaries-answer <g>


:-) thomas
Post by Paul
That would be excellent Thomas - thanks!
Appreciate you looking whatever the result.
Anyway, I have posted the Rav file to nevrona.public.binaries
entitled "Group Totals - Attention -> thomas"
I will check here (and Binaries on Nevrona) for your reply.
Many thanks again ..
Cheers..
paul.
On Tue, 5 Feb 2008 14:55:44 +0100, "Thomas Pfister"
Post by Thomas Pfister
Paul,
upload the rav-file on the binaries-area in the nevrona.com-newsgroups, I'll
look into it!
:-) thomas
Post by Paul
Post by delfo
Post by Paul
All seems to work ok - but for some reason - the totals are not in
step with the results expected. The first group total is blank - the
second shows total for the previous group (the missing one.)
I think the problem may be the order of the components in the project
http://dn.codegear.com/article/31917
Hi again -
I have check the ordering of components/totals and I cannot see any
problems. I have a group footer with 2 CalcTotal components, both
seem to work fine. The totals are correct for the group. Its when I
try add these together (using a calcOp component) that I have
problems.
I have a CalcOp component that adds the 2 together and places the
result in a parameter called GroupTotal. This is always zero for some
reason.
So if anyone can help - please let me know as I am completely stuck
here.
Thanks.
OS : Windows XP Service Pack 2
Delphi : 2005 Service Pack 3 Installed
Version 9.0.1935.22056
CPU : AMD 3500+
Memory 1Gig
OS : Windows XP Service Pack 2
Delphi : 2005 Service Pack 3 Installed
Version 9.0.1935.22056
CPU : AMD 3500+
Memory 1Gig
Paul
2008-03-11 07:55:53 UTC
Permalink
Just like to say the problem is now fixed - thanks to Thomas for all
your help in this matter - a credit to the community ;)

Cheers m8..

Paul.





On Thu, 7 Feb 2008 20:08:04 +0100, "Thomas Pfister"
Post by Thomas Pfister
Paul,
look into the binaries-answer <g>
:-) thomas
Post by Paul
That would be excellent Thomas - thanks!
Appreciate you looking whatever the result.
Anyway, I have posted the Rav file to nevrona.public.binaries
entitled "Group Totals - Attention -> thomas"
I will check here (and Binaries on Nevrona) for your reply.
Many thanks again ..
Cheers..
paul.
On Tue, 5 Feb 2008 14:55:44 +0100, "Thomas Pfister"
Post by Thomas Pfister
Paul,
upload the rav-file on the binaries-area in the nevrona.com-newsgroups, I'll
look into it!
:-) thomas
Post by Paul
Post by delfo
Post by Paul
All seems to work ok - but for some reason - the totals are not in
step with the results expected. The first group total is blank - the
second shows total for the previous group (the missing one.)
I think the problem may be the order of the components in the project
http://dn.codegear.com/article/31917
Hi again -
I have check the ordering of components/totals and I cannot see any
problems. I have a group footer with 2 CalcTotal components, both
seem to work fine. The totals are correct for the group. Its when I
try add these together (using a calcOp component) that I have
problems.
I have a CalcOp component that adds the 2 together and places the
result in a parameter called GroupTotal. This is always zero for some
reason.
So if anyone can help - please let me know as I am completely stuck
here.
Thanks.
OS : Windows XP Service Pack 2
Delphi : 2005 Service Pack 3 Installed
Version 9.0.1935.22056
CPU : AMD 3500+
Memory 1Gig
OS : Windows XP Service Pack 2
Delphi : 2005 Service Pack 3 Installed
Version 9.0.1935.22056
CPU : AMD 3500+
Memory 1Gig
OS : Windows XP Service Pack 2
Delphi : 2005 Service Pack 3 Installed
Version 9.0.1935.22056
CPU : AMD 3500+
Memory 1Gig

Loading...