subtotal of a column
Patrick HALLOUIN
Hello,i want to add up a field in a detail row but i can't use the aggregate of the advancedataband because my field in the detail row is a result of a LD.QueryData.
How can i do ?
Thanks
Heiko Szendeleit
Hi Patrick,to get a subtotal of a column, the detail part should be a part of a group in between your databand,
In the group footer you can use the aggregate function for your subtotal.
hope this helps
Heiko
Patrick HALLOUIN
in the group footer i can't use the aggregate function, i have an errormy field have textBox3 in the Design Name and totalarticlemois in the Apparence Text, how must i make ?
Thanks
Philipp Knecht
Hi PatrickYou can save your LD.QueryData Expression in a variable.
In the Document CommonScript:
Dim myVar As Double
In the GetDataScript of the DataBand:
myVar = LD.QueryDataNum("Select Num From Foo")Then you can use myVar in the Textbox as well as in the Totals Collection.
hth
Patrick HALLOUIN
thanks for yor help, i have 0 in my subtotalin the CommonScript i have Dim myVar As Double
i have a advancegroupband : total_ligne_produit
in this advancegroupband i have a Detail with my field LD.QueryData
in the GetDataScript of total_ligne_produitAdvancedGroupBand i have myVar=LD.QueryDataNum( -- query --)
in the AdvanceDataBand in Data - Totals, i have AggregateFunction : Sum, Expression myVar, Name soustotal
in total_ligne_produitAdvancedGroupBand i have a footer, in the footer i have a field, in value i have gettotal("soustotal")
i do'nt have errors but i have 0 in my subtotal
Philipp Knecht
Hi PatrickUse the GetDataScript of the DataBand not the GroupBand.
hth
0
Please sign in to leave a comment.
Comments
0 comments