How can I show %qty in Various bands
venu4sunkris@yahoo.com
I am building a report which has to display qty and % of qty
data fields in master data, Group footer etc. bands.
Let us assume, qty of prod1 = 21 and total qty of all products = 108.
In the master data band,
Product Name Qty %Qty
prod1 21 21 *100/108( = 19.44)
Prod2 5 5 * 100/108( = 4.63)
In group footer
26 26 * 100/108( = 24.07)
I am building a report which has to display qty and % of qty
data fields in master data, Group footer etc. bands.
Let us assume, qty of prod1 = 21 and total qty of all products = 108.
In the master data band,
Product Name Qty %Qty
prod1 21 21 *100/108( = 19.44)
Prod2 5 5 * 100/108( = 4.63)
In group footer
26 26 * 100/108( = 24.07)
Comments
in the memo you wish to display the %qty value
[qty]/[totqty*100]
in the above example we assume [qty] and [totqty] are variables with values.
but they could also be datafields or expressions depending upon where the
the expression is used
ie memo in mdband
[tablename."fieldname"]/[totqty*100]
ie in a footer
[sum([tablename."fieldname"])/[totqty*100]
you may get more complex if you have to gather the value for total quantity during report processing, ie displaying a value in a groupheader that is dependant upon the sum of values of the group. Then you have to make report 2 pass, gather values in an indexed array and use if final pass statements in obp of band
to substitute array value. see the reportdemo's total in header report.