Calcaluate group total in group footer
Suppose the report has two group (group 0 and group 1) and in the detail
band, there are some dbtext for display the record in master Table and a
subreport for display the detail table, then I need to display the sum of a
field in the detail table at the group 1 (outer group) footer band , how to
do that?
if the sum is display in the subreport, I think using dbcalc is ok, but how
about to show the sum in outer group footer in main report (the detail
record is placed in subreport, not in main report).
band, there are some dbtext for display the record in master Table and a
subreport for display the detail table, then I need to display the sum of a
field in the detail table at the group 1 (outer group) footer band , how to
do that?
if the sum is display in the subreport, I think using dbcalc is ok, but how
about to show the sum in outer group footer in main report (the detail
record is placed in subreport, not in main report).
This discussion has been closed.
Comments
If you are using RAP see the following example of keeping a running total.
http://www.digital-metaphors.com/tips/mdraprunningtotal.zip
It also helps us if you post all RAP questions in the RAP newsgroups.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
running total, but what will happen if user jumping page from page 1 to 3
without seeing page2? (the value in page 2 will also be calculated? expected
result is yes)
vblMain?
There is no any OnCalc event for vblMainTotal, where is the value come from?
MainTotal := vblMainTotal;
What is it's function?
I still don't know where is the value of vblmaintotal come from?
I found that I have no method to change the value of global variable in
oncalc event of Tppvariable in subreport, I can't say why? I have waste one
day for study this simple task, any easier method or example given to me and
any good reference?
(I have wrongly create a new post , not reply, in this group, sorry about
that!)
I'm sorry, I assumed you were using RAP. If you are not using RAP, simply
place a TppVariable inside your detail band and inside its OnCalc event
update the value of another TppVariable located somewhere else on your
report.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
In the Calc tab, if you view the RAP code for the subreport (use the tabs at
the bottom), you will see that in the OnCalc event of the DetailValue
variable uses the global variable gMainTotal to update the values of the
variables in the main report.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
global variable gMainTotal. This is necessary in order to access objects
from a subreport in RAP.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
band of SUBREPORT and in its OnCalc event update the value of another
TppVariable located in the main report group footer?
2) If this is true, then if the user jumping page (from page 1 jump to page
3 without preview page 2), then will the result not included value in page
2?
3) Also, Assume the tppvariable is inside a region of detail band in
subreport, then will the oncalc event fires more than once if the detail
band in subreport cannot fit in the page and then print on another page ?
(So the group total in main report is larger than the correct, expected
value)?