How to calculate value os two Groups?
Hello, I have one report, and I have two Group: Group[0] codint and
Group[1]: tipo_desc.. in the footer os Group[1] I have one DBCalc, to
calculate the sum of field Valor and I have one DBText1 to show me value of
field TIPO (integer), my question is...
Sorry my english, next the example:
+------------------------------
| Detail
| TIPO=1 DBCalc1.Value = 130
| TIPO=1 DBCalc1.Value = 50
| TIPO=2 DBCalc1.Value = 30
|-----------------------------------
| Footer GRoup[1] DBCalc1 = 130+50-30 = 150
|-------------------------------
| Footer GRoup[0] SystemVariable = (Sum of DBCalc1)
|-------------------------------
How I do this? I hop to explain correct :-)
Thanks for all..
Fellipe H.
Group[1]: tipo_desc.. in the footer os Group[1] I have one DBCalc, to
calculate the sum of field Valor and I have one DBText1 to show me value of
field TIPO (integer), my question is...
Sorry my english, next the example:
+------------------------------
| Detail
| TIPO=1 DBCalc1.Value = 130
| TIPO=1 DBCalc1.Value = 50
| TIPO=2 DBCalc1.Value = 30
|-----------------------------------
| Footer GRoup[1] DBCalc1 = 130+50-30 = 150
|-------------------------------
| Footer GRoup[0] SystemVariable = (Sum of DBCalc1)
|-------------------------------
How I do this? I hop to explain correct :-)
Thanks for all..
Fellipe H.
This discussion has been closed.
Comments
Instead of using DBCalcs in the group footers, try using TppVaribles
instead. For instance...
+------------------------------
| Detail
| TIPO=1 DBText1.Value = 130 Variable1
| TIPO=1 DBText1.Value = 50 Variable1
| TIPO=2 DBText1.Value = -30 Varialbe1
|-----------------------------------
| Footer GRoup[1] Variable2 (reset on StartGroup1)
|-------------------------------
| Footer GRoup[0] Varialbe3 (reset on StartGroup2)
|-------------------------------
Inside the Variable1.OnCalc event update the value of Variable2 and 3.
Variable2.Value := Variable2.Value + Report.Datapipeline['myfield'];
Variable3.Value := Variable3.Value + Report.Datapipeline['myfield'];
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
thanks
Fellipe H.
Which version of ReportBuilder are you using? Take a look at the following
example. It shows what I was talking about in my first post.
http://www.digital-metaphors.com/tips/DetailSummaryInMain.zip
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com